public GrammarNonDeterminismMessage(DecisionProbe probe, DFAState problemState) { super(ErrorManager.MSG_GRAMMAR_NONDETERMINISM); this.probe = probe; this.problemState = problemState; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_TOKEN_NONDETERMINISM); } }
public GrammarNonDeterminismMessage(DecisionProbe probe, DFAState problemState) { super(ErrorManager.MSG_GRAMMAR_NONDETERMINISM); this.probe = probe; this.problemState = problemState; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_TOKEN_NONDETERMINISM); } }
public GrammarNonDeterminismMessage(DecisionProbe probe, DFAState problemState) { super(ErrorManager.MSG_GRAMMAR_NONDETERMINISM); this.probe = probe; this.problemState = problemState; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_TOKEN_NONDETERMINISM); } }
public GrammarUnreachableAltsMessage(DecisionProbe probe, List alts) { super(ErrorManager.MSG_UNREACHABLE_ALTS); this.probe = probe; this.alts = alts; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_UNREACHABLE_TOKENS); } }
public GrammarNonDeterminismMessage(DecisionProbe probe, DFAState problemState) { super(ErrorManager.MSG_GRAMMAR_NONDETERMINISM); this.probe = probe; this.problemState = problemState; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_TOKEN_NONDETERMINISM); } }
public GrammarUnreachableAltsMessage(DecisionProbe probe, List alts) { super(ErrorManager.MSG_UNREACHABLE_ALTS); this.probe = probe; this.alts = alts; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_UNREACHABLE_TOKENS); } }
public GrammarUnreachableAltsMessage(DecisionProbe probe, List<Integer> alts) { super(ErrorManager.MSG_UNREACHABLE_ALTS); this.probe = probe; this.alts = alts; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_UNREACHABLE_TOKENS); } }
public GrammarUnreachableAltsMessage(DecisionProbe probe, List<Integer> alts) { super(ErrorManager.MSG_UNREACHABLE_ALTS); this.probe = probe; this.alts = alts; // flip msg ID if alts are actually token refs in Tokens rule if ( probe.dfa.isTokensRuleDecision() ) { setMessageID(ErrorManager.MSG_UNREACHABLE_TOKENS); } }
dfa.isTokensRuleDecision() && dfa.probe.stateToSyntacticallyAmbiguousTokensRuleAltsMap.size()>0 )
dfa.isTokensRuleDecision() && dfa.probe.stateToSyntacticallyAmbiguousTokensRuleAltsMap.size()>0 )
dfa.isTokensRuleDecision() && dfa.probe.stateToSyntacticallyAmbiguousTokensRuleAltsMap.size()>0 )
dfa.isTokensRuleDecision() && dfa.probe.stateToSyntacticallyAmbiguousTokensRuleAltsMap.size()>0 )
if ( dfa.isTokensRuleDecision() ) { for (Integer altI : unreachableAlts) { GrammarAST decAST = dfa.getDecisionASTNode();
public String toString() { GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode(); line = decisionASTNode.getLine(); column = decisionASTNode.getColumn(); String fileName = probe.dfa.nfa.grammar.getFileName(); if ( fileName!=null ) { file = fileName; } StringTemplate st = getMessageTemplate(); if ( probe.dfa.isTokensRuleDecision() ) { // alts are token rules, convert to the names instead of numbers for (int i = 0; i < alts.size(); i++) { Integer altI = (Integer) alts.get(i); String tokenName = probe.getTokenNameForTokensRuleAlt(altI.intValue()); // reset the line/col to the token definition NFAState ruleStart = probe.dfa.nfa.grammar.getRuleStartState(tokenName); line = ruleStart.associatedASTNode.getLine(); column = ruleStart.associatedASTNode.getColumn(); st.setAttribute("tokens", tokenName); } } else { // regular alt numbers, show the alts st.setAttribute("alts", alts); } return super.toString(st); }
public String toString() { GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode(); line = decisionASTNode.getLine(); column = decisionASTNode.getColumn(); String fileName = probe.dfa.nfa.grammar.getFileName(); if ( fileName!=null ) { file = fileName; } StringTemplate st = getMessageTemplate(); if ( probe.dfa.isTokensRuleDecision() ) { // alts are token rules, convert to the names instead of numbers for (int i = 0; i < alts.size(); i++) { Integer altI = (Integer) alts.get(i); String tokenName = probe.getTokenNameForTokensRuleAlt(altI.intValue()); // reset the line/col to the token definition NFAState ruleStart = probe.dfa.nfa.grammar.getRuleStartState(tokenName); line = ruleStart.associatedASTNode.getLine(); column = ruleStart.associatedASTNode.getColumn(); st.setAttribute("tokens", tokenName); } } else { // regular alt numbers, show the alts st.setAttribute("alts", alts); } return super.toString(st); }
st.setAttribute("input", input); if ( probe.dfa.isTokensRuleDecision() ) { Set disabledAlts = probe.getDisabledAlternatives(problemState); for (Iterator it = disabledAlts.iterator(); it.hasNext();) { if ( probe.dfa.isTokensRuleDecision() ) {
st.setAttribute("input", input); if ( probe.dfa.isTokensRuleDecision() ) { Set disabledAlts = probe.getDisabledAlternatives(problemState); for (Iterator it = disabledAlts.iterator(); it.hasNext();) { if ( probe.dfa.isTokensRuleDecision() ) {
@Override public String toString() { GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode(); line = decisionASTNode.getLine(); column = decisionASTNode.getCharPositionInLine(); String fileName = probe.dfa.nfa.grammar.getFileName(); if ( fileName!=null ) { file = fileName; } ST st = getMessageTemplate(); if ( probe.dfa.isTokensRuleDecision() ) { // alts are token rules, convert to the names instead of numbers for (int i = 0; i < alts.size(); i++) { Integer altI = alts.get(i); String tokenName = probe.getTokenNameForTokensRuleAlt(altI); // reset the line/col to the token definition NFAState ruleStart = probe.dfa.nfa.grammar.getRuleStartState(tokenName); line = ruleStart.associatedASTNode.getLine(); column = ruleStart.associatedASTNode.getCharPositionInLine(); st.add("tokens", tokenName); } } else { // regular alt numbers, show the alts st.add("alts", alts); } return super.toString(st); }
@Override public String toString() { GrammarAST decisionASTNode = probe.dfa.getDecisionASTNode(); line = decisionASTNode.getLine(); column = decisionASTNode.getCharPositionInLine(); String fileName = probe.dfa.nfa.grammar.getFileName(); if ( fileName!=null ) { file = fileName; } ST st = getMessageTemplate(); if ( probe.dfa.isTokensRuleDecision() ) { // alts are token rules, convert to the names instead of numbers for (int i = 0; i < alts.size(); i++) { Integer altI = alts.get(i); String tokenName = probe.getTokenNameForTokensRuleAlt(altI); // reset the line/col to the token definition NFAState ruleStart = probe.dfa.nfa.grammar.getRuleStartState(tokenName); line = ruleStart.associatedASTNode.getLine(); column = ruleStart.associatedASTNode.getCharPositionInLine(); st.add("tokens", tokenName); } } else { // regular alt numbers, show the alts st.add("alts", alts); } return super.toString(st); }
st.add("input", input); if ( probe.dfa.isTokensRuleDecision() ) { Set<Integer> disabledAlts = probe.getDisabledAlternatives(problemState); for (Integer altI : disabledAlts) { if ( probe.dfa.isTokensRuleDecision() ) {