Skip to content

Commit

Permalink
fix: #3718 Correct DFAState index in Lexer ATN Simulator
Browse files Browse the repository at this point in the history
Signed-off-by: Jim.Idle <[email protected]>
  • Loading branch information
Jim.Idle authored and parrt committed Aug 15, 2022
1 parent 4c54ee1 commit e99022e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/Go/antlr/lexer_atn_simulator.go
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@ func (l *LexerATNSimulator) addDFAState(configs ATNConfigSet, suppressEdge bool)
// The proposed state has already been added to the DFA. We still have the pointer, so
// we can modify it even though it is stored already.
//
proposed.stateNumber = dfa.states.Len()
proposed.stateNumber = dfa.states.Len() - 1
configs.SetReadOnly(true)
proposed.configs = configs
}
Expand Down

0 comments on commit e99022e

Please sign in to comment.