[antlr-interest] Accessing generated AST root node within parser ?

lars.vonwedel at bayertechnology.com lars.vonwedel at bayertechnology.com
Tue Oct 28 07:08:56 PDT 2008


Hello,

I would like to do something with the generated root node while parsing, 
similar to this (which of course does not work):

init
        :       KW_INITIALISE ( ( SEMICOLON) data )*
                { VerifyInitData( $init, 0, 4, 1 ); }
                -> ^(KW_INITIALISE data*) 
        ;

Is there any equivalent construct I might use ? Or would use of a tree 
walker be the clean approach ?

Freundliche Grüße / Best Regards
Lars von Wedel
_________________________________________

Bayer Technology Services GmbH
Web: www.bayertechnology.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20081028/22736158/attachment.html 


More information about the antlr-interest mailing list