public static void Main(string[] args) { using (StreamReader reader = new StreamReader(@"C:\git\bacnet\bacnet.txt")) { Lexer lexer = new Lexer(reader); Parser parser = new Parser(lexer); CSharpTypeGenerator gen = new CSharpTypeGenerator(@"C:\git\bacnet\BACnet.Ashrae\generated", "BACnet.Ashrae"); NamedType type = parser.Next(); while(type != null) { gen.Generate(type); type = parser.Next(); } } }
/// <summary> /// Constructs a new parser instance /// </summary> /// <param name="lexer">The lexer instance</param> public Parser(Lexer lexer) { this._lexer = lexer; this._token = null; this._hasToken = false; }