[antlr-interest] Parse assignments and method calls

Jim Idle jimi at temporal-wave.com
Tue Mar 23 08:43:16 PDT 2010


Such things are excluded semantically not syntactically. Basically as many rules as possible should be tested semantically rather than syntactically as the error messages that ensue are generally very much better. You get "chained assignments are not allowed" vs Syntax error at '=' for instance.

Jim


> -----Original Message-----
> From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-
> bounces at antlr.org] On Behalf Of Damien Urruty
> Sent: Tuesday, March 23, 2010 7:25 AM
> To: antlr-interest at antlr.org
> Subject: Re: [antlr-interest] Parse assignments and method calls
> 
> 
> On Tue, Mar 23, 2010 at 2:56 PM, Damien Urruty
> <lepi... at hotmail.com>wrote:
> 
> It's the Java Grammar 1.6 by Yang Jiang, but every grammar that I have
> encountered works the same way, the ones on the wiki, and Sun's one : a
> left-hand side variable can be a expression like 2+3...
> 
> Hello
> I have been working on the Java grammar,...
> 
> What is "the Java grammar" here? A ANTLR grammar you found on the net,
> or on
> one of ANTLR's wiki pages[1]? If so, you might want to tell which one
> (there's more than one on the wiki). Or do you mean the grammar from
> the
> JLS[2]?
> 
> Regards,
> 
> Bart.
> 
> [1] http://www.antlr.org/grammar/list[2]
> http://java.sun.com/docs/books/jls/second_edition/html/syntax.doc.html
> 
> 
> 
> _________________________________________________________________
> Consultez gratuitement vos emails Orange, Gmail, Free, ... directement
> dans HOTMAIL !
> http://www.windowslive.fr/hotmail/agregation/
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-
> email-address





More information about the antlr-interest mailing list