[antlr-interest] Re: Tree weirdness C++ mode

Monty Zukowski monty at codetransform.com
Fri Apr 30 09:23:18 PDT 2004


On Apr 29, 2004, at 1:12 PM, lgcraymer wrote:

>> astFactory->addASTChild(currentAST, #[EMPTY]);
>> ##=#(##,#[EMPTY,"empty"]);
>>
>> Does that seem right?  I suspect this might be different from Java.
>
> Java is the same, and it does make sense from the internals.  It gives
> the user optimization control by leaving the construction operators
> fairly dumb.  My construction stuff will help a bit (2.8; I'm still
> waiting for release approval), but we will need to revisit the tree
> construction internals for ANTLR 3 to make use a bit less error-prone.

Thanks!  I'm glad it's just me...

At the very least there should be a language agnostic way to introduce 
new nodes and add them as the last child.

Also the documentation for tree building didn't say much about ASTPair 
or building trees with the factory v. by tree methods.

Monty Zukowski

ANTLR & Java Consultant -- http://www.codetransform.com
ANSI C/GCC transformation toolkit -- 
http://www.codetransform.com/gcc.html
Embrace the Decay -- http://www.codetransform.com/EmbraceDecay.html



 
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