Checkout older lexer atn simulator

This commit is contained in:
Peter Boyer 2017-03-12 12:06:59 -04:00
parent 2132555b6b
commit e1bce5284a
1 changed files with 3 additions and 3 deletions

View File

@ -10,7 +10,7 @@ import (
)
var (
LexerATNSimulatorDebug = false
LexerATNSimulatorDebug = false
LexerATNSimulatorDFADebug = false
LexerATNSimulatorMinDFAEdge = 0
@ -311,7 +311,7 @@ func (l *LexerATNSimulator) accept(input CharStream, lexerActionExecutor *LexerA
}
func (l *LexerATNSimulator) getReachableTarget(trans Transition, t int) ATNState {
if trans.Matches(t, 0, 0xFFFE) {
if trans.Matches(t, 0, LexerMaxCharValue) {
return trans.getTarget()
}
@ -461,7 +461,7 @@ func (l *LexerATNSimulator) getEpsilonTarget(input CharStream, config *LexerATNC
trans.getSerializationType() == TransitionRANGE ||
trans.getSerializationType() == TransitionSET {
if treatEOFAsEpsilon {
if trans.Matches(TokenEOF, 0, 0xFFFF) {
if trans.Matches(TokenEOF, 0, LexerMaxCharValue) {
cfg = NewLexerATNConfig4(config, trans.getTarget())
}
}