[antlr-interest] Re: Updated version of C# codegen 2.7.2a2 now on ANTLR site
Dare Obasanjo
kpako at yahoo.com
Wed Jul 17 21:46:13 PDT 2002
--- Micheal J <open.zone at virgin.net> wrote:
> You need to prefix the token name with the
> TokenTypes class name in the
> "$setType" statement (as well as other references to
> tokens in the .g file).
> This is due to differences in the way interface
> inheritance works in Java
> and C#. In C# you have to specify the name of the
> class as a prefix.
>
> Your example should read:
>
> IDENT_OR_RULE_BEGIN
> : (IDENT "::=") => RULE_BEGIN
> {$setType(FooTokenTypes.RULE_BEGIN); }
> | IDENT { $setType(FooTokenTypes.IDENT); }
> ;
>
Thanks for the clarification, I kinda figured this out
but wanted to make sure it wasn't a bug before going
on.
=====
THINGS TO DO IF I BECOME AN EVIL OVERLORD #79
If my doomsday device happens to come with a reverse switch, as soon as it has been employed it will be melted down and made into limited-edition commemorative coins.
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list