protected Assembly CreateIdl(Stream source, AssemblyName targetName, bool anyToAnyContainerMapping, bool makeInterfaceDisposable, ArrayList refAssemblies) { IDLParser parser = new IDLParser(source); ASTspecification spec = parser.specification(); // now parsed representation can be visited with the visitors MetaDataGenerator generator = new MetaDataGenerator(targetName, ".", refAssemblies); generator.MapAnyToAnyContainer = anyToAnyContainerMapping; if (makeInterfaceDisposable) { generator.InheritedInterface = typeof(System.IDisposable); } generator.InitalizeForSource(parser.getSymbolTable()); spec.jjtAccept(generator, null); Assembly result = generator.ResultAssembly; return result; }
private void processFile( MetaDataGenerator generator, string file ) { Console.WriteLine("processing file: " + file); Trace.WriteLine(""); MemoryStream source = Preprocess( file ); // preprocess the file IDLParser parser = new IDLParser(source); Trace.WriteLine("parsing file: " + file ); ASTspecification spec = parser.specification(); Trace.WriteLine(parser.getSymbolTable()); // now parsed representation can be visited with the visitors generator.InitalizeForSource(parser.getSymbolTable()); spec.jjtAccept(generator, null); Trace.WriteLine(""); }