public Parser(Scanner scanner, CodeGen codegen, SymbolTable symtab, ProgramOptions options, System.IO.StreamWriter listingWriter) { this.scanner = scanner; this.codegen = codegen; this.symtab = symtab; this.genlist = options.enableListing; this.listwriter = listingWriter; labelList_ID = new List<Symbol>(); labelList_UD = new List<Symbol>(); }
public Assembler(ProgramOptions options) { genlist = options.enableListing; outname = options.outputName; if (genlist) { listwriter = new System.IO.StreamWriter(new System.IO.MemoryStream()); } scanner = new Scanner(); symtab = new SymbolTable(scanner); codegen = new CodeGen(scanner, symtab, options, listwriter); parser = new Parser(scanner, codegen, symtab, options, listwriter); }