Esempio n. 1
0
 public void ParseTypedef()
 {
     CreateLexer("typedef int GOO;");
     CParser parser = new CParser(parserState, lexer);
     var decl = parser.Parse();
     //Assert.AreEqual("int", td.TypeSpecifier.ToString());
     //Assert.AreEqual("GOO", td.Declarators[0]);
 }
Esempio n. 2
0
 public override TypeLibrary Load(IPlatform platform, TypeLibrary dstLib)
 {
     var rdr = new StreamReader(new MemoryStream(bytes));
     var lexer = new CLexer(rdr);
     var state = new ParserState();
     var parser = new CParser(state, lexer);
     var symbolTable = new SymbolTable(platform);
     var declarations = parser.Parse();
     var tldser = new TypeLibraryDeserializer(platform, true, dstLib);
     foreach (var decl in declarations)
     {
         ProcessDeclaration(decl, platform, tldser, symbolTable);
     }
     return dstLib;
 }