forked from jasder/antlr
v4: Can't add a DFA edge for token types < -1 (EOF)
[git-p4: depot-paths = "//depot/code/antlr4/main/": change = 9269]
This commit is contained in:
parent
783c3b2e50
commit
3ca6ab034d
|
@ -771,7 +771,7 @@ public class ParserATNSimulator extends ATNSimulator {
|
|||
}
|
||||
|
||||
protected void addDFAEdge(DFAState p, int t, DFAState q) {
|
||||
if ( p==null ) return;
|
||||
if ( p==null || t < -1 ) return;
|
||||
if ( p.edges==null ) {
|
||||
p.edges = new DFAState[atn.maxTokenType+1+1]; // TODO: make adaptive
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue