public final int getLastToken(int i) { int l = (i >= prs.rhs(state.currentAction) ? state.lastToken : state.tokens.get(state.locationStack[state.stateStackTop + i] - 1)); return tokStream.getLastErrorToken(l); }
// // Process reductions and continue... // private int process_repair_reductions(int act) { do { System.out.println("process_repair_reductions: " + act); state.stateStackTop -= (prs.rhs(act) - 1); act = prs.ntAction(state.stateStack[state.stateStackTop], prs.lhs(act)); } while (act <= NUM_RULES); return act; }
// // Process reductions and continue... // private int process_backtrack_reductions(int act) { do { state.stateStackTop -= (prs.rhs(act) - 1); trialAction(act); if (backtrackRequested) { backtrackRequested = false; return ERROR_ACTION; } act = prs.ntAction(state.stateStack[state.stateStackTop], prs.lhs(act)); } while (act <= NUM_RULES); return act; }