protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
int expectedTokenType = Token.INVALID_TYPE; if ( !ime.getExpectedTokens().isNil() ) { expectedTokenType = ime.getExpectedTokens().getMinElement(); // get any element
int expectedTokenType = Token.INVALID_TYPE; if ( !expecting.isNil() ) { expectedTokenType = expecting.getMinElement(); // get any element
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
protected int getAltThatFinishedDecisionEntryRule(ATNConfigSet configs) { IntervalSet alts = new IntervalSet(); for (ATNConfig c : configs) { if ( c.getOuterContextDepth()>0 || (c.state instanceof RuleStopState && c.context.hasEmptyPath()) ) { alts.add(c.alt); } } if ( alts.size()==0 ) return ATN.INVALID_ALT_NUMBER; return alts.getMinElement(); }
ATNState blockEndState = decision.getOptimizedTransition(setTransitions.getMinElement()).target.getOptimizedTransition(0).target; IntervalSet matchSet = new IntervalSet(); for (int i = 0; i < setTransitions.getIntervals().size(); i++) { if (matchSet.getIntervals().size() == 1) { if (matchSet.size() == 1) { newTransition = new AtomTransition(blockEndState, matchSet.getMinElement()); } else { Interval matchInterval = matchSet.getIntervals().get(0);
if (matchSet.getIntervals().size() == 1) { if (matchSet.size() == 1) { newTransition = new AtomTransition(blockEndState, matchSet.getMinElement()); } else { Interval matchInterval = matchSet.getIntervals().get(0);
if (matchSet.getIntervals().size() == 1) { if (matchSet.size() == 1) { newTransition = CodePointTransitions.createWithCodePoint(blockEndState, matchSet.getMinElement());
if (matchSet.getIntervals().size() == 1) { if (matchSet.size() == 1) { newTransition = new AtomTransition(blockEndState, matchSet.getMinElement()); } else { Interval matchInterval = matchSet.getIntervals().get(0);
if (matchSet.getIntervals().size() == 1) { if (matchSet.size() == 1) { newTransition = CodePointTransitions.createWithCodePoint(blockEndState, matchSet.getMinElement());
InputMismatchException ime = (InputMismatchException)e; Token tok = e.getOffendingToken(); int expectedTokenType = ime.getExpectedTokens().getMinElement(); // get any element Token errToken = getTokenFactory().create(new Pair<TokenSource, CharStream>(tok.getTokenSource(), tok.getTokenSource().getInputStream()),
int expectedTokenType = Token.INVALID_TYPE; if ( !ime.getExpectedTokens().isNil() ) { expectedTokenType = ime.getExpectedTokens().getMinElement(); // get any element
@Override protected Token getMissingSymbol(Parser recognizer) { Token currentSymbol = recognizer.getCurrentToken(); IntervalSet expecting = getExpectedTokens(recognizer); int expectedTokenType = Token.INVALID_TYPE; if (!expecting.isNil()) { expectedTokenType = expecting.getMinElement(); // get any element } String tokenText; if (expectedTokenType == Token.EOF) tokenText = "<missing EOF>"; else tokenText = "<missing " + recognizer.getVocabulary().getDisplayName(expectedTokenType) + ">"; Token current = currentSymbol; Token lookback = recognizer.getInputStream().LT(-1); if (current.getType() == Token.EOF && lookback != null) { current = lookback; } ProToken tok = new ProToken(ABLNodeType.getNodeType(expectedTokenType), tokenText); tok.setLine(current.getLine()); tok.setCharPositionInLine(current.getCharPositionInLine()); return tok; } }
@Override protected Token getMissingSymbol(Parser recognizer) { Token currentSymbol = recognizer.getCurrentToken(); IntervalSet expecting = getExpectedTokens(recognizer); int expectedTokenType = Token.INVALID_TYPE; if (!expecting.isNil()) { expectedTokenType = expecting.getMinElement(); // get any element } String tokenText; if (expectedTokenType == Token.EOF) tokenText = "<missing EOF>"; else tokenText = "<missing " + recognizer.getVocabulary().getDisplayName(expectedTokenType) + ">"; Token current = currentSymbol; Token lookback = recognizer.getInputStream().LT(-1); if (current.getType() == Token.EOF && lookback != null) { current = lookback; } ProToken tok = new ProToken(ABLNodeType.getNodeType(expectedTokenType), tokenText); tok.setLine(current.getLine()); tok.setCharPositionInLine(current.getCharPositionInLine()); return tok; } }
int expectedTokenType = Token.INVALID_TYPE; if ( !ime.getExpectedTokens().isNil() ) { expectedTokenType = ime.getExpectedTokens().getMinElement(); // get any element
int expectedTokenType = Token.INVALID_TYPE; if ( !expecting.isNil() ) { expectedTokenType = expecting.getMinElement(); // get any element
Token currentSymbol = recognizer.getCurrentToken(); IntervalSet expecting = getExpectedTokens(recognizer); int expectedTokenType = expecting.getMinElement(); // get any element String tokenText; if ( expectedTokenType== Token.EOF ) tokenText = "<missing EOF>";
Token currentSymbol = recognizer.getCurrentToken(); IntervalSet expecting = getExpectedTokens(recognizer); int expectedTokenType = expecting.getMinElement(); // get any element String tokenText; if ( expectedTokenType== Token.EOF ) tokenText = "<missing EOF>";
int expectedTokenType = Token.INVALID_TYPE; if ( !expecting.isNil() ) { expectedTokenType = expecting.getMinElement(); // get any element