예제 #1
0
 public AbstractSyntaxTree Parse()
 {
     AbstractSyntaxTree ast = new AbstractSyntaxTree();
     GetNextToken ();
     ast.Statements = ParseStatements(Set (Category.End_Of_File), Set ());
     return ast;
 }
예제 #2
0
 bool DoParsing()
 {
     this.parser = new Parser(scanner, errors);
     this.ast = parser.Parse();
     string errMsg = "Your program contained some syntax errors and could not be interpreted:";
     return DoErrorCheckingAndWriteErrorMessages(errMsg, ErrorType.SyntaxError);
 }
예제 #3
0
 public SemanticAnalyser(AbstractSyntaxTree ast, ErrorContainer errors)
 {
     this.ast = ast;
     this.errors = errors;
 }
예제 #4
0
 public void Interprete(AbstractSyntaxTree ast)
 {
     Interprete(ast.Statements);
 }