[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

The new feature is explained in section 5.8 of the documentation on the
following page:

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


You'll need to use this:


Sam Harwell
Owner, Lead Developer

-----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

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

More information about the antlr-interest mailing list