Lexer will pass the original tokens even if it can be inferred to match the type of terminal defined in .cup file.

master
bill 4 years ago
parent 2ab3fddc66
commit 27b46f386d

@ -39,7 +39,7 @@ import java.util.ArrayList;
/** Return a terminal symbol of syntactic category TYPE and no /** Return a terminal symbol of syntactic category TYPE and no
* semantic value at the current source location. */ * semantic value at the current source location. */
private Symbol symbol(int type) { private Symbol symbol(int type) {
return symbol(type, null); return symbol(type, yytext());
} }
/** Return a terminal symbol of syntactic category TYPE and semantic /** Return a terminal symbol of syntactic category TYPE and semantic

Loading…
Cancel
Save