[antlr-interest] Lexer rule question

Johannes Luber jaluber at gmx.de
Fri Feb 8 08:09:51 PST 2008


Hi!

I have never needed to know the answer before now, but what is the 
actual difference between:

A : B ;

B : 'B' ;

and

A : B ;

fragment B : 'B' ;

? How many tokens are produced in the first variant? 1 or 2? And if 2, 
what do they actually contain for values?

Johannes


More information about the antlr-interest mailing list