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); }
Integer altI = (Integer) it.next(); String tokenName = probe.getTokenNameForTokensRuleAlt(altI.intValue()); probe.getTokenNameForTokensRuleAlt(displayAltI.intValue()); st.setAttribute("conflictingTokens", tokenName);
Integer altI = (Integer) it.next(); String tokenName = probe.getTokenNameForTokensRuleAlt(altI.intValue()); probe.getTokenNameForTokensRuleAlt(displayAltI.intValue()); st.setAttribute("conflictingTokens", tokenName);
@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); }
for (Integer altI : disabledAlts) { String tokenName = probe.getTokenNameForTokensRuleAlt(altI); probe.getTokenNameForTokensRuleAlt(displayAltI); st.add("conflictingTokens", tokenName);
for (Integer altI : disabledAlts) { String tokenName = probe.getTokenNameForTokensRuleAlt(altI); probe.getTokenNameForTokensRuleAlt(displayAltI); st.add("conflictingTokens", tokenName);