예제 #1
0
 public override void Reset()
 {
     CompilerDirectives.Clear();
     grammar_stream = CGTResourceExtractor.Extract(new ResourceManager("PascalABCParser.PascalABCLang", Assembly.GetExecutingAssembly()),"PascalABCLanguage");
     parser = new GPBParser_PascalABC(grammar_stream, preprocessor2);
     parser.Parse("begin end.");
     max_errors = 30;
 }
예제 #2
0
 public override void PreBuildTree(string FileName)
 {
     if (this.parser == null)
         Reset();
     CompilerDirectives = new List<compiler_directive>();
     localparser = new GPBParser_PascalABC(this.grammar_stream, this.parser.LanguageGrammar, preprocessor2);
     localparser.CompilerDirectives = CompilerDirectives;
     localparser.errors = Errors;
     localparser.current_file_name = FileName;
     localparser.parsertools.LineCorrection = 0;
     localparser.build_tree_for_brackets = false;
     preprocessor2 = new Preprocessor2.Preprocessor2(SourceFilesProvider);
 }
예제 #3
0
 public PascalABCLanguageParser()
     : base("PascalABC.NET", "2.2", "(c) Ткачук А.В. 2005,2008; Михалкович С.С. 2012", false, new string[1]{".gpas"})
 {
     parser = null;
 }