示例#1
0
        static void TestSyntacticAnalyzer()
        {
            var errorDigest = ReadErrorDigest();
            var errorTable  = new ErrorTable(errorDigest);

            var ioModule          = new IOModule(errorTable, @"..\..\data\test_sem_1.pas", @"..\..\data\listing.txt");
            var lexicalAnalyzer   = new LexicalAnalyzer(ioModule);
            var syntacticAnalyzer = new SyntacticAnalyzer(ioModule, lexicalAnalyzer);

            syntacticAnalyzer.Run();
            ioModule.Dispose();
        }
示例#2
0
 public SyntacticAnalyzer(IOModule ioModule, LexicalAnalyzer lexicalAnalyzer)
 {
     this.ioModule        = ioModule;
     this.lexicalAnalyzer = lexicalAnalyzer;
 }