public LexicalAnalysisModule(LexicalFileHandler LAF) { this.Xml_Grm = LAF.Grammar; this.File_stream = LAF.parseFile; this.file_stream = File_stream.charArray; xml_class_set = Xml_Grm.getGPBTables(); SymbolTable = xml_class_set.getSymbolTable(); CharSet = xml_class_set.getCharSetTable(); DFAState = xml_class_set.getDFATable(); }
public Parser(string XMLFilePath, string Pfile) { XMLParser = new XMLParser(XMLFilePath); XMLParser.parseAll(); GoldTab = XMLParser.getGPBTables(); SymbolTab = GoldTab.getSymbolTable(); Rules = GoldTab.getRuleTable(); CharList = GoldTab.getCharSetTable(); LALRlist = GoldTab.getLALRTable(); fileWriter = new StreamWriter(Pfile); }