[antlr-interest] The ^ and !

Alexander Lenski alenski at dca.net
Sun Sep 22 12:42:19 PDT 2002


Hi,
I can not tell you that. Nothing is generated. The 2.7.2a2 quits on the first ! with the

ANTLR Parser Generator   Version 2.7.2a2 (20020112-1)   1989-2002 jGuru.com
cppmexpander.g:442:6: Suffixing a root node with '!' is not implemented
Exiting due to errors.

err msg.

Alexander Lenski

----- Original Message ----- 
From: "Terence Parr" <parrt at jguru.com>
To: <antlr-interest at yahoogroups.com>
Sent: Friday, September 20, 2002 6:50 PM
Subject: Re: [antlr-interest] The ^ and !


> Hmm...the ! on a root should be ok, right?  So, 2.7.2a2 doesn't like ! 
> on the root?  what does it generate vs 2.7.1?
> 
> Ter
> 
> On Friday, September 20, 2002, at 02:30  PM, Alexander Lenski wrote:
> 
> > Thank you Terence for the answer.
> > But what we got with the ! ?
> > I have the AST transformation rules that are ok with the 2.7.1 but the 
> > 2.7.2a2 generates err msgs as it is promised.
> > Should I change the rules or wait for the final 2.7.2?
> > 
> > Typical rule:
> > 
> > protected
> > me_to_s_literal[ MCall* pMC, TYPE_SP_T& spWS ]
> > { assert( pMC );
> > TYPE_SP_AST spR;
> > }
> > : #( spO:PP_TO_S_LITERAL!
> > ( IDENT!
> > { Some code
> > }
> > | PP_VA_ARGS!
> > { Some code
> > }
> > ) )
> > { Some code
> > }
> > ;
> > 
> > Thanks,
> > Alexander Lenski
> > 
> > ----- Original Message -----
> > From: "Terence Parr" <parrt at jguru.com>
> > To: <antlr-interest at yahoogroups.com>
> > Sent: Friday, September 20, 2002 2:42 PM
> > Subject: Re: [antlr-interest] The ^ and !
> >
> > >
> > > On Friday, September 20, 2002, at 10:59 AM, Alexander Lenski wrote:
> > >
> > > > From the CHANGES-2.7.2.txt:
> > > >
> > > > "Bad code gen with ^ or ! on tree root
> > > > when building trees in a tree walker grammar such as:
> > > >
> > > > expr: #(PLUS^ expr expr)
> > > > | i:INT
> > > > ;
> > > >
> > > > Fortunately, ^ is simply redundant; removing it makes code ok.
> > > > Added a warning. Added an error message for ! saying that it
> > > > is not implemented."
> > > >
> > > > Are the ^ and ! not implemented yet or they are gone forever?
> > >
> > > Hi. They are still there...just don't use ^ on the root...it's 
> > already
> > > a root.
> > >
> > > Ter
> > > --
> > > Co-founder, http://www.jguru.com
> > > Creator, ANTLR Parser Generator: http://www.antlr.org
> > >
> > >
> > > 
> > >
> > > Your use of Yahoo! Groups is subject to 
> > http://docs.yahoo.com/info/terms/
> > >
> > >
> > >
> > Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
> --
> Co-founder, http://www.jguru.com
> Creator, ANTLR Parser Generator: http://www.antlr.org
> Lecturer in Comp. Sci., University of San Francisco
> 
> 
>  
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20020922/66448cb6/attachment.html


More information about the antlr-interest mailing list