[antlr-interest] StringTemplate v4 and C# fails for me at step zero
macolange at gmail.com
Thu Feb 9 04:35:33 PST 2012
> I'm using Antlr3 version 126.96.36.19904.
> I added a reference to the Antlr4.StringTemplate.dll and set the output option to "output=template" in my (working) tree grammar. Even though I hadn't added any template expansions, a quick verifying-compilation failed because Antlr added the following statements to the source file that it generated:
> using Antlr3.ST;
> using Antlr3.ST.Language;
> which do not refer to the correct namespaces for the DLL that I downloaded (it should be Antlr4.StringTemplate), and it also has added code like this:
> private StringTemplateGroup _templateGroup = new StringTemplateGroup("PhaseTwoTemplates", typeof(AngleBracketTemplateLexer) );
> yet the object browser shows that the DLL contains no such object (it should be called TemplateGroup).
Beware: the StringTemplate4 library is released and (as far as i know)
running, whereas Antlr4 is still under development.
You can use StringTemplate4 with Antlr3 with a few modifications to your
> Does this stuff work under C#, or have I got a corrupted setup somehow?
It seems to me that you got confused between StringTemplate4 and Antlr4.
I do not use the C# target, but according to the doc of ST4, it works
Hope this helps.
More information about the antlr-interest