[antlr-interest] Re: Bug in ANTLR C# Codegen?

Ney, Richard richard.ney at aspect.com
Tue Nov 5 12:20:03 PST 2002


Hey Michael,

In a way I applied a fix, I just don't know if it is the right one. I added
code to check and see if noViableOption printed to the output. Now if there
can be a legal case where noViableOption contains a throw statement and the
howToFinish.needAnErrorClause can be false then yes I have updated my fix to
the unreachable code warnings. I just don't know if that is a legal case.

As for using 2.7.2a4 I was looking at adding the C# codegen to it but the
new 2.7.2a4 files I downloaded have a minor difference so my merge tools
consider the two files completely different so I can't see the changes
required to the base ANTLR files to make sure the merge is clean to add the
C# codegen in. I might get to it later but it will require visual inspection
which is slower.

-Richard

-----Original Message-----
From: micheal_jor [mailto:open.zone at virgin.net] 
Sent: Tuesday, November 05, 2002 11:12 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Re: Bug in ANTLR C# Codegen?


Hi Richard,

> Michael,
> 
> Here is my CSharpCodeGenerator.java. I have coded around the error I 
> mentioned here by making sure the noViableOption string is actually
going to
> get printed to the file.

Thanks. Are you saying that the file you have attached includes a fix 
for the issue you raised in your original message (in addition to the 
previous two issues) ?

> Sorry about the mix-up on version. I have
> downloaded 2.7.2a4 but I am currently not using it. I applied the
fixes to
> the C# codegen for 2.7.2a2.

OK. I just thought you had applied the C# codegen to ANTLR 2.7.2a4. 
That's one way to start testing the C# codegen against the latest 
ANTLR version  ;-)

> This version also contains a fix to silence the
> warning:
> 
> warning CS0168: The variable 'pe' is declared but never used
> 
> By adding in a dummy call to pe.getLine();

OK.

Micheal



 

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