[antlr-interest] 3.1 Upgrade problem
Johannes Luber
jaluber at gmx.de
Thu Apr 17 12:11:08 PDT 2008
Marko Simovic schrieb:
> 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.
Please use the latest daily build - ANTLRworks 1.2b1 may not be uptodate.
Johannes
> 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);
>>
More information about the antlr-interest
mailing list