[antlr-interest] 3.1 Upgrade problem

Marko Simovic markobarko at gmail.com
Thu Apr 17 11:22:13 PDT 2008


So, i've been using antlrworks-1.1.7.jar to create my grammar so far.
grammar produced a parser that ran fine. i then switched and started
using antlrworks-1.2b1.jar. Code generation for C# is the issue.

The following rule:

expression	
	:	statement | assignment | Comment;

generates this code (last line in this snippet references an unknown
member of the generated class above it):


> public class expression_return : ParserRuleReturnScope 
>     {
>         internal CommonTree tree;
>         override public object Tree
>         {
>         	get { return tree; }
>         }
>     };
>     
>     // $ANTLR start expression
>     // Test.g:31:1: expression : ( statement | assignment | Comment );
>     public expression_return expression() // throws RecognitionException [1]
>     {   
>         expression_return retval = new expression_return();
>         retval.start = input.LT(1);
>  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20080417/e52e907b/attachment.html 


More information about the antlr-interest mailing list