private void match(string word) { if (LA.type == ("T_" + word)) { last_token = LA; LA = lexicalAnalyzer.nextToken(); } else { error(LA.lexeme); } }
public Syntax(Lexical lexical) { lexicalAnalyzer = lexical; if (lexicalAnalyzer.errorReporter().Count > 0) { Error error = new Error(); error.analayzer = "SyntaxAnalyzer"; error.word = "LexicalAnalyzerError"; error.description = "lexical analyzer reported error . first check lexical errors"; errors.Add(error); } else { LA = lexicalAnalyzer.nextToken(); } }