[antlr-interest] How to use StringTemplate 4 with C#

Sam Harwell sharwell at pixelminegames.com
Thu Aug 25 06:34:02 PDT 2011


In ANTLR 3, the "output=template" option is only able to produce code for
ST3. You'll have to remove that option and write all your own actions if you
want to target ST4.

Sam

-----Original Message-----
From: antlr-interest-bounces at antlr.org
[mailto:antlr-interest-bounces at antlr.org] On Behalf Of Maik Schmidt
Sent: Thursday, August 25, 2011 6:28 AM
To: antlr-interest at antlr.org
Subject: [antlr-interest] How to use StringTemplate 4 with C#

Hi!

I am writing a tree grammar with the following header

tree grammar Translator;

options {
    language=CSharp3;
    tokenVocab=Test;
    ASTLabelType=CommonTree;
    output = template;
}

My problem is that the generated code contains statements such as "using
Antlr3.ST". I have added a reference to the Antl3 StringTemplate DLL but I
am wondering how I can use version 4.

Cheers,
Maik

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