[antlr-interest] CSharp3 language not generating heterogeneous nodes

Sam Harwell sam at tunnelvisionlabs.com
Sun Jul 22 15:40:18 PDT 2012


Since the hetero-node feature was infrequently used compared to certain
rewrite situations, the C# port of ANTLR uses a different syntax for hetero
nodes.

The new feature is explained in section 5.8 of the documentation on the
following page:
http://www.antlr.org/wiki/display/ANTLR3/Antlr3CSharpReleases

To use the hetero-nodes, you'll need to use the full syntax. Instead of
this:

Token<NodeType>

You'll need to use this:

Token<node=NodeType>

--
Sam Harwell
Owner, Lead Developer
http://tunnelvisionlabs.com


-----Original Message-----
From: Jacob Page [mailto:jacob.h.page at gmail.com] 
Sent: Sunday, July 22, 2012 2:36 PM
To: antlr-interest at antlr.org
Subject: [antlr-interest] CSharp3 language not generating heterogeneous
nodes

I want to generate an AST using heterogeneous nodes using the C# 3 language.
My grammar uses rewrite rules.  Unfortunately, it doesn't look like the
generated code utilizes my specified custom node types at all; rather, only
the ASTLabelType directive is respected. Is this a known limitation of the
CSharp3 target, or is there something additional I have to do besides
specifying node types in the rewrite rules?

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