[antlr-interest] ASTLabelType C# Problem

Sam Harwell sharwell at pixelminegames.com
Sun Jul 10 15:46:05 PDT 2011


I'm not sure which templates are in use by AntlrWorks 1.4.2, but they
certainly aren't the latest/correct version for the CSharp3 target. Under
most conditions, the CSharp3 target doesn't emit the *_return classes at
all, and renaming the rules wouldn't affect that.

I suggest trying the latest version of the C# target available on the
following page:
http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of DJB MASTER
Sent: Sunday, July 10, 2011 5:17 PM
To: antlr-interest at antlr.org
Subject: Re: [antlr-interest] ASTLabelType C# Problem

I've generated the code with AntlrWorks 1.4.2. and also used the antlr tool,
both give the same compile errors.

The reason that 'statement_return' doesn't exist in your version, is i've
just renamed the rules in the grammar from 'stat' to 'statement', no big
deal that should effect the generated code. The parser generates a
CommonTree AST just fine.

This isn't specific to this grammar. I wrote another grammar, which again
generates an AST fine using CommonTree, but when I add ASTLabelType to
change the node type, I get these errors.

--
View this message in context:
http://antlr.1301665.n2.nabble.com/ASTLabelType-C-Problem-tp6567453p6568771.
html
Sent from the ANTLR mailing list archive at Nabble.com.

List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe:
http://www.antlr.org/mailman/options/antlr-interest/your-email-address



More information about the antlr-interest mailing list