static void Main(string[] args) { Start: Console.Write("> "); string data = Console.ReadLine(); TemplateLexer lexer = new TemplateLexer(data); do { Token token = lexer.Next(); Console.WriteLine("{0} ({1}, {2}): {3}", token.TokenKind.ToString(), token.Line, token.Col , token.Data); if (token.TokenKind == TokenKind.EOF) break; } while (true); goto Start; }
public TemplateParser(TemplateLexer lexer) { this.lexer = lexer; this.elements = new List<Element>(); }