[antlr-interest] v3.1.2 breakage in Lexer with +=

Greg Smolyn greg at smolyn.org
Mon Mar 9 17:12:35 PDT 2009


Hi,

I just upgraded from Antlr 3.1.1 to 3.1.2, and have discovered that a  
simple construct in my lexer no longer compiles:

fragment F_HEXDIGIT
   : '0'..'9' | 'a'..'f' | 'A'..'F'
   ;

fragment F_UNICODEDIGITS
   : (h+=F_HEXDIGIT)+ {$h.Count <= 6}?
   ;


In 3.1.1 this works fine, but in 3.1.2, the "h" is not defined inside  
the generated function!

Is this a bug or am I doing something wrong?  I'm using the CSharp2  
generator and the output=AST option.

-greg



More information about the antlr-interest mailing list