[antlr-interest] Bug using scopes, rule parameters, java code gen

Terence Parr parrt at cs.usfca.edu
Fri Nov 9 17:57:06 PST 2007


On Nov 9, 2007, at 1:23 AM, Curtis Clauson wrote:

> The body of scope and the argument to a rule are not actions. You  
> can not include target language code like Java in them.

hi. actually they are actions. sounds like a bug.

> The scope body is a list of named attributes associated with type  
> descriptions from the target language and delimited with a ';'.

correct.

> The argument to a rule is a reference to local or scoped attribute,  
> and not target code. So you can refer to the named attribute within  
> the scope, but you cannot use target language syntax like a Java  
> method call.

you can, just a bug in this case.
Added bug:

http://www.antlr.org:8888/browse/ANTLR-194

Ter


More information about the antlr-interest mailing list