Use ATNConfigSet instead of OrderedHashSet<ATNConfig>

This commit is contained in:
sharwell 2012-02-08 17:06:41 -06:00
parent 52256044a9
commit 1df70924f5
2 changed files with 6 additions and 8 deletions

View File

@ -29,20 +29,19 @@
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.atn.ATNConfig;
import org.antlr.v4.runtime.misc.OrderedHashSet;
import org.antlr.v4.runtime.atn.ATNConfigSet;
public class LexerNoViableAltException extends RecognitionException {
/** Matching attempted at what input index? */
public int startIndex;
/** 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,
CharStream input,
int startIndex,
OrderedHashSet<ATNConfig> deadEndConfigs) {
ATNConfigSet deadEndConfigs) {
super(lexer, input, null);
this.startIndex = startIndex;
this.deadEndConfigs = deadEndConfigs;

View File

@ -28,15 +28,14 @@
*/
package org.antlr.v4.runtime;
import org.antlr.v4.runtime.atn.ATNConfig;
import org.antlr.v4.runtime.misc.OrderedHashSet;
import org.antlr.v4.runtime.atn.ATNConfigSet;
/** The parser could not decide which path in the decision to take based
* upon the remaining input.
*/
public class NoViableAltException extends RecognitionException {
/** 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
* not be buffering tokens so get a reference to it. (At the
@ -57,7 +56,7 @@ public class NoViableAltException extends RecognitionException {
SymbolStream<Symbol> input,
Token startToken,
Token offendingToken,
OrderedHashSet<ATNConfig> deadEndConfigs,
ATNConfigSet deadEndConfigs,
ParserRuleContext ctx)
{
super(recognizer, input, ctx);