[antlr-interest] C# code generation errors

Johannes Luber JALuber at gmx.de
Fri May 1 12:42:36 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. :)

I think it was version 3.1.3. As it has some other bug fixes everyone should upgrade to it. Unfortunately, ANTLRworks uses 3.1.2 so either you manage to update ANTLRworks or use the command tool separately.

Johannes

> 
> 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
> 
> 
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe:
> http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger01


More information about the antlr-interest mailing list