[antlr-interest] Re: rooting a parser rule rather than a token

lgcraymer lgc at mail1.jpl.nasa.gov
Wed Aug 11 14:14:41 PDT 2004


--- In antlr-interest at yahoogroups.com, "Eric Mahurin"
<eric_mahurin at y...> wrote:
> I'm not sure why, but antlr doesn't currently allow you to make a call
> to a rule from another rule an AST root.  So, you can't do something
> like this:
> 
> binary_expression : primary (binary_operator^ primary)* ;
> 
That's a feature, not a bug.  It prevents you from losing any children
of the binary_operator root AST.  We did talk about this particular
topic at the cabal, and ANTLR 3 may provide a different approach.

--Loring



 
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