Use ATNConfigSet instead of OrderedHashSet<ATNConfig>
This commit is contained in:
parent
52256044a9
commit
1df70924f5
|
@ -29,20 +29,19 @@
|
||||||
|
|
||||||
package org.antlr.v4.runtime;
|
package org.antlr.v4.runtime;
|
||||||
|
|
||||||
import org.antlr.v4.runtime.atn.ATNConfig;
|
import org.antlr.v4.runtime.atn.ATNConfigSet;
|
||||||
import org.antlr.v4.runtime.misc.OrderedHashSet;
|
|
||||||
|
|
||||||
public class LexerNoViableAltException extends RecognitionException {
|
public class LexerNoViableAltException extends RecognitionException {
|
||||||
/** Matching attempted at what input index? */
|
/** Matching attempted at what input index? */
|
||||||
public int startIndex;
|
public int startIndex;
|
||||||
|
|
||||||
/** Which configurations did we try at input.index() that couldn't match input.LA(1)? */
|
/** Which configurations did we try at input.index() that couldn't match input.LA(1)? */
|
||||||
public OrderedHashSet<ATNConfig> deadEndConfigs;
|
public ATNConfigSet deadEndConfigs;
|
||||||
|
|
||||||
public LexerNoViableAltException(Lexer lexer,
|
public LexerNoViableAltException(Lexer lexer,
|
||||||
CharStream input,
|
CharStream input,
|
||||||
int startIndex,
|
int startIndex,
|
||||||
OrderedHashSet<ATNConfig> deadEndConfigs) {
|
ATNConfigSet deadEndConfigs) {
|
||||||
super(lexer, input, null);
|
super(lexer, input, null);
|
||||||
this.startIndex = startIndex;
|
this.startIndex = startIndex;
|
||||||
this.deadEndConfigs = deadEndConfigs;
|
this.deadEndConfigs = deadEndConfigs;
|
||||||
|
|
|
@ -28,15 +28,14 @@
|
||||||
*/
|
*/
|
||||||
package org.antlr.v4.runtime;
|
package org.antlr.v4.runtime;
|
||||||
|
|
||||||
import org.antlr.v4.runtime.atn.ATNConfig;
|
import org.antlr.v4.runtime.atn.ATNConfigSet;
|
||||||
import org.antlr.v4.runtime.misc.OrderedHashSet;
|
|
||||||
|
|
||||||
/** The parser could not decide which path in the decision to take based
|
/** The parser could not decide which path in the decision to take based
|
||||||
* upon the remaining input.
|
* upon the remaining input.
|
||||||
*/
|
*/
|
||||||
public class NoViableAltException extends RecognitionException {
|
public class NoViableAltException extends RecognitionException {
|
||||||
/** Which configurations did we try at input.index() that couldn't match input.LT(1)? */
|
/** Which configurations did we try at input.index() that couldn't match input.LT(1)? */
|
||||||
public OrderedHashSet<ATNConfig> deadEndConfigs;
|
public ATNConfigSet deadEndConfigs;
|
||||||
|
|
||||||
/** The token object at the start index; the input stream might
|
/** The token object at the start index; the input stream might
|
||||||
* not be buffering tokens so get a reference to it. (At the
|
* not be buffering tokens so get a reference to it. (At the
|
||||||
|
@ -57,7 +56,7 @@ public class NoViableAltException extends RecognitionException {
|
||||||
SymbolStream<Symbol> input,
|
SymbolStream<Symbol> input,
|
||||||
Token startToken,
|
Token startToken,
|
||||||
Token offendingToken,
|
Token offendingToken,
|
||||||
OrderedHashSet<ATNConfig> deadEndConfigs,
|
ATNConfigSet deadEndConfigs,
|
||||||
ParserRuleContext ctx)
|
ParserRuleContext ctx)
|
||||||
{
|
{
|
||||||
super(recognizer, input, ctx);
|
super(recognizer, input, ctx);
|
||||||
|
|
Loading…
Reference in New Issue