bison-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: nonpure/pure/push


From: Paul Eggert
Subject: Re: nonpure/pure/push
Date: Mon, 13 Feb 2006 22:48:38 -0800
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

Bob Rossi <address@hidden> writes:

> As I implement the push parser, I'm forced to have the same collection
> of globals in an ADT.

Hmm, just _one_ type?  Wouldn't it be a collection of types (and
objects to go along with them)?  That way you could localize info to
just the primitives that need it.

> First, I would like to know if when using a nonpure parser, if users
> of bison access those global data variables?

Never underestimate the power of Bison users to refer to all those
crufty globals....  But I think yhour approach with
backwards-compatibility macros should work.

> The code in yyparse would then change to something like
> (globalvar->yychar) instead of simply yychar.

Won't this slow things down somewhat?  It might not hurt to look at
the size/speed of the resulting nonpure code.  I suspect the
reformulated version won't be optimized as well as the original.
(But then, I've been wrong about optimization before....)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]