[antlr-interest] Re: C# generator no working

micheal_jor open.zone at virgin.net
Fri Jul 4 14:37:31 PDT 2003


Ciao Patrick,

> Hi ! 
> I've some problems when building C# lexer and parser. 
> 
> Now I know that:
> I can compile & run the first example that generate Java code with 
t.g
> -> then i believe that antlr does work
> 
> I've tried to build C# from the grammar at the bottom of the page, 
but
> I receive the following error message:
> java.lang .. NoClassDefFoundError: antlr/actionscsharp/ActionLexer

Sounds like one of the following:
1. ANTLR is not fully built or,
2. the antlr/actions/csharp/ActionLexer.class file is missing or,
3. you have a classpath issue

Please check and try again.

> Is this caused by the version of antlr i'm using ?

ANTLR 2.7.2 is the latest version. The 2.7.2a? versions were pre-
release versions (alpha/beta) and should not be used. Some are 
*incompatible* with the 2.7.2 release.

Finally, your included grammar (which I have removed from my reply) 
contains embedded Java action code. ANTLR would generate the output 
files but they would not compile with any C# compiler with the 
embedded Java code. You need to change those to C# syntax.

Cheers,

Micheal
ANTLR/C# codegen



 

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




More information about the antlr-interest mailing list