The type or namespace name 'DefaultTemplateLexer' could not be found

Posted by user310291 on Stack Overflow See other posts from Stack Overflow or by user310291
Published on 2011-01-09T23:50:41Z Indexed on 2011/01/09 23:53 UTC
Read the original article Hit count: 292

Filed under:

The official tutorial from http://www.antlr.org/wiki/display/ST/Five+minute+Introduction doesn't work because of DefaultTemplateLexer, how to fix ?

using System;
using Antlr.StringTemplate;

class Script
{
    static public void Main(string[] args)
    {


StringTemplateGroup group =  new StringTemplateGroup("myGroup", @"C:\Tutorials\stringtemplate", typeof(DefaultTemplateLexer));
StringTemplate helloAgain = group.GetInstanceOf("homepage");

helloAgain.SetAttribute("title", "Welcome To StringTemplate");
helloAgain.SetAttribute("name", "World");
helloAgain.SetAttribute("friends", "Terence");
helloAgain.SetAttribute("friends", "Kunle");
helloAgain.SetAttribute("friends", "Micheal");
helloAgain.SetAttribute("friends", "Marq");

Console.Out.WriteLine(helloAgain.ToString());
    }
}

© Stack Overflow or respective owner

Related posts about c#