[antlr-interest] More on TokenWithIndex

John D. Mitchell johnm-antlr at non.net
Wed Oct 27 10:08:42 PDT 2004


Hi, Paul

>>>>> "Paul" == Paul J Lucas <pauljlucas at mac.com> writes:
>>>>>> On Wed, 27 Oct 2004, Monty Zukowski writes:
[...]

>> Well, for your DECLARE, you could have DECLARE^ instead of DECLARE!

> 	Yes, but that produces a tree with otherwise useless nodes in it,
> i.e.:

> 		DECLARE <-- this isn't really needed BASE_URL_DECL ...

Well, given your example, it seems that it is needed.  :-)

Seriously, one of the key purposes of extra layers in the AST is to give
you the extra grip that you need to make doing the things that you want,
easier.

>> Another approach would be to keep some sort of stack of "interesting"
>> regions.

> 	Yeah.  It would be nice if ANTLR did all this sort of thing for you
> since the entire problem is of general interest.  (Terrence?)

(A) Psst!  That's "Terence" with one 'r'.  [He's usually too polite to
mention it but it's something that seems to bug him. :-)]

(B) The attribute support coming in v3 will certainly make that easy to do.
That's a wicked tease, I know.  I'm jonesing for that very support right
now in a translator that I'm working on as that built-in dynamic attribute
support would make all sorts of things that I'm doing quicker and easier to
do.

Take care,
	John


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/antlr-interest/

<*> To unsubscribe from this group, send an email to:
    antlr-interest-unsubscribe at yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 





More information about the antlr-interest mailing list