[antlr-interest] Re: Missed the token file fix in C# codegen

Ney, Richard richard.ney at aspect.com
Tue Nov 19 09:02:45 PST 2002


If I have a lexer, a parser, and a tree parser in the same grammar file. I
have the exportVocab option on the parser and lexer set to Foo. This
generates the token file named FooTokenTypes.cs containing the class
FooTokenTypes. 

For the tree parser FooTreeParser in the same file the importVocab option is
set to Foo. It generates the token file FooTreeParserTokenTypes.cs with the
class FooTokenTypes in it. This causes a compiler error since there is now
two classes with the same name is in two different files. My fix makes it so
the class name for the second file is FooTreeParserTokenTypes.

-Richard

-----Original Message-----
From: micheal_jor [mailto:open.zone at virgin.net] 
Sent: Tuesday, November 19, 2002 8:54 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Re: Missed the token file fix in C# codegen



> You missed the fix I made to genTokenTypes()in the new version
where the
> second token class for the tree parser gets the same name as the
original
> token class if your tree parser is in the same file with your lexer
and
> parser.

Richard,

I'm not sure I understand the issue that the patch is supposed to 
fix. What behaviour does the codegen exhibit currently that you 
believe is wrong?. 

Micheal

PS    Please bear in mind that 2.7.2a4 has _replaced_ 2.7.2a2.



 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 


 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list