forked from jasder/antlr
small speed tweak
This commit is contained in:
parent
a28b299dd4
commit
b8035d36d0
|
@ -221,7 +221,7 @@ public abstract class Parser extends Recognizer<Token, ParserATNSimulator> {
|
||||||
public Token match(int ttype) throws RecognitionException {
|
public Token match(int ttype) throws RecognitionException {
|
||||||
Token t = getCurrentToken();
|
Token t = getCurrentToken();
|
||||||
if ( t.getType()==ttype ) {
|
if ( t.getType()==ttype ) {
|
||||||
if ( t.getType()==Token.EOF ) {
|
if ( ttype==Token.EOF ) {
|
||||||
matchedEOF = true;
|
matchedEOF = true;
|
||||||
}
|
}
|
||||||
_errHandler.reportMatch(this);
|
_errHandler.reportMatch(this);
|
||||||
|
|
Loading…
Reference in New Issue