[antlr-interest] C# generated code refering rules

Johannes Luber jaluber at gmx.de
Thu Jul 5 04:56:35 PDT 2007


Liviu U wrote:
> Hi.
> 
> I am looking in the generated code.

I've used your posted grammar and know your problem now. The reason is
that you are using '...' in parser rules. The associated tokens don't
have generally a ASCII name (while 'class' could be turned automatically
into CLASS, '(' or other symbols would cause compilers to issue errors),
so they are given unique ones. If you want to change that then you have
to use separate lexer rules for keywords.

Best regards,
Johannes Luber

P.S.: Please be aware that your emails don't get automatically to the
ANTLR list, when you use the "reply" button. And regarding your grammar:
Why don't you use the one from Ecma 334? And why so cryptic
abbreviations? There is no reason to use them, really.


More information about the antlr-interest mailing list