[antlr-interest] [bug?] commented scope error

Gavin Lambert antlr at mirality.co.nz
Mon Aug 11 03:04:41 PDT 2008


At 20:13 11/08/2008, David Benn wrote:
 >If you have a commented line containing a scope symbol 
reference,
 >e.g.
 >
 >// $foo::bar = 42;
 >...
 >foo :
 >// scope {
 >//    int bar;
 >//}
 >...
 >;
 >
 >ANTLR 3.1b1 still complains that 'bar' does not exist.

If that first comment is within a target code block, then this is 
expected behaviour.  ANTLR doesn't know the syntax of target code 
comments, so it will try to perform the substitution regardless.



More information about the antlr-interest mailing list