[antlr-interest] ANTLR v3.04b - problems with the generated CSharp code

Manuel Abadia manunews at gmail.com
Sat Nov 4 03:14:09 PST 2006


Hi,

I have tried the lastest v3 version and the generated CSharp code has
some minor problems:
VS2005 reports that the generated files don't have consistent line endings.
Also, the following warings appear:

warning CS0114: 'CSharpTest.GrammarFileName' hides inherited member
'Antlr.Runtime.BaseRecognizer.GrammarFileName'. To make the current
member override that implementation, add the override keyword.
Otherwise add the new keyword.

warning CS0114: 'CSharpTestLexer.GrammarFileName' hides inherited
member 'Antlr.Runtime.BaseRecognizer.GrammarFileName'. To make the
current member override that implementation, add the override keyword.
Otherwise add the new keyword.

If I call antlr with the -debug option some additional errors appear:

error CS0246: The type or namespace name 'DebugEventListener' could
not be found (are you missing a using directive or an assembly
reference?)
error CS0246: The type or namespace name 'TreeAdaptor' could not be
found (are you missing a using directive or an assembly reference?)

I have search for those types and only found IDebugEventListener and
ITreeAdaptor so maybe that's the fix.

Finally I want to know how can I debug a CSharp generated grammar with
ANTLRWorks. It seems that I have to use Debug remote but I don't know
how to start my csharp grammar. Can somebody help me?

Thanks,
Manu


More information about the antlr-interest mailing list