[antlr-interest] added ANTLR v3 page
Matt Benson
gudnabrsam at yahoo.com
Fri Feb 3 06:19:25 PST 2006
All places where you see the = sign, showed up as
funny blocks in Mozilla FF... I assume those were some
form of single quote.
-Matt
--- Sebastian Kaliszewski
<Sebastian.Kaliszewski at softax.com.pl> wrote:
> On Tuesday 31 January 2006 22:47, Terence Parr
> wrote:
>
> > Howdy,
> >
> > I have finally added a description page for v3:
>
>
> Something with the example parser is not right:
>
>
> <quote>
> grammar SimpleParser;
> program : variable* method+ ;
> variable: "int" ID ( = expr)? '; ; // HUH???
> method : "method" ID '(' ')'
> '{'
> variable* statement+
> '}'
> ;
> statement
>
> : ID = expr ';'
> :
> | "return" expr ';'
>
> ;
> expr : ID | INT ;
> ID : ('a'..'z'|'A'..'Z')+ ;
> INT : '0'..'9'+ ;
> WS : (' '|'\t'|'\n')+ {channel=99;}
> ;
>
> Note that all literals are single-quoted...
> </quote>
>
> Line 3 probably has ' missing
>
> And then which of "int" or "method" or "return" is
> single quoted?
>
>
> rgds
> --
> Sebastian Kaliszewski
>
>
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
More information about the antlr-interest
mailing list