[antlr-interest] antlr 2.7.6 C# bug confirmed. Re: 2.7.6/examples/csharp/cpp broken (C#)

F Reig fermin.reig at gmail.com
Fri Mar 31 06:59:16 PST 2006

On 3/30/06, F Reig <fermin.reig at gmail.com> wrote:
> Hi,
> I need a nested lexer to handle included files, and I was looking at
> the examples in the distribution for inspiration. I've generated C#
> from  cpp.g and tested the resulting lexer with the sample input. I
> get this output:
> ./cppLexer.exe < cpp.in
> int a,b;
> int x;
> int z;
> which is incorrect.
> Can anyone else please verify this?  (I don't have access to Java in
> this computer right now, so I cannot verify whether the same example
> works OK when antlr generates Java. That would help diagnose the
> problem as a bug in cpp.g or a bug in antlr generating C#)

I've checked this with antlr generating Java, and it works as expected:

java -classpath .:$CLASSPATH cpp < cpp.in
int a,b;
int x;
int z;
int y;
int c;

This suggests that there is a bug in antlr itself (2.7.6), either in the C#
library, or (less likely) in the C# code generator.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20060331/eb34c98b/attachment.html

More information about the antlr-interest mailing list