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();
        }
Beispiel #2
0
 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);
 }
Beispiel #3
0
 public XMLParser(string path)
 {
     this.path = path;
     GPBTables = new GoldParserTables();
 }
Beispiel #4
0
 //Constructor
 public XMLParser()
 {
     path      = "calculator.xml"; //for testing purpose.  Will actually pass.
     GPBTables = new GoldParserTables();
 }