[antlr-interest] C# code generation errors

Sam Harwell sharwell at pixelminegames.com
Fri May 1 11:44:00 PDT 2009


Hi Bill,

In the 'expr' rule, you have the following action that is missing a
semicolon:
{$value = $e.value}

In the 'atom' rule, you have an action with a call to toInt32 instead of
ToInt32.

You should add a cast to ArrayList in your action in the 'elist' rule.

I can't reproduce the 'eee' error; it may have been corrected since the
build you are using. I do seem to remember it being a problem in the
past that was corrected. Johannes would know exactly which build
corrected this. :)

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Bill Steer
Sent: Friday, May 01, 2009 1:32 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] C# code generation errors

I've now found four errors in the generation of the C# code for my
grammar:

1. A statement is missing a semicolon
2. A statement is missing a cast from IList to ArrayList 3. A statement
contains "Convert.toInt32" instead of "Convert.ToInt32"
4. An exception variable is "eee1" but it is referenced in the 'catch' 
block as "eee"

Attached is the grammar (certainly not guaranteed to be correct!) that
generates the errors.

Do I need to do anything else to report the errors?

Bill



More information about the antlr-interest mailing list