ActionTransition a = new ActionTransition(target, arg1, arg2, arg3 != 0); return a; case Transition.SET : return new SetTransition(target, sets.get(arg1));
buf.append("-").append(a.toString()).append("->").append(getStateString(t.target)).append('\n');
int actionIndex = ((ActionTransition)transition).actionIndex; LexerCustomAction lexerAction = new LexerCustomAction(ruleIndex, actionIndex); state.setTransition(i, new ActionTransition(transition.target, ruleIndex, legacyLexerActions.size(), false)); legacyLexerActions.add(lexerAction);
buf.append("-").append(a.toString()).append("->").append(getStateString(t.target)).append('\n');
/** Build what amounts to an epsilon transition with an action. * The action goes into ATN though it is ignored during prediction * if {@link ActionTransition#actionIndex actionIndex}{@code <0}. */ @Override public Handle action(ActionAST action) { //System.out.println("action: "+action); ATNState left = newState(action); ATNState right = newState(action); ActionTransition a = new ActionTransition(right, currentRule.index); left.addTransition(a); action.atnState = left; return new Handle(left, right); }
buf.append("-").append(a.toString()).append("->").append(getStateString(t.target)).append('\n');
/** Build what amounts to an epsilon transition with an action. * The action goes into ATN though it is ignored during prediction * if {@link ActionTransition#actionIndex actionIndex}{@code <0}. */ @Override public Handle action(ActionAST action) { //System.out.println("action: "+action); ATNState left = newState(action); ATNState right = newState(action); ActionTransition a = new ActionTransition(right, currentRule.index); left.addTransition(a); action.atnState = left; return new Handle(left, right); }
buf.append("-").append(a.toString()).append("->").append(getStateString(t.target)).append('\n');
/** Build what amounts to an epsilon transition with an action. * The action goes into ATN though it is ignored during prediction * if {@link ActionTransition#actionIndex actionIndex}{@code <0}. */ @Override public Handle action(ActionAST action) { //System.out.println("action: "+action); ATNState left = newState(action); ATNState right = newState(action); ActionTransition a = new ActionTransition(right, currentRule.index); left.addTransition(a); action.atnState = left; return new Handle(left, right); }
buf.append("-").append(a.toString()).append("->").append(getStateString(t.target)).append('\n');
/** Build what amounts to an epsilon transition with an action. * The action goes into ATN though it is ignored during prediction * if {@link ActionTransition#actionIndex actionIndex}{@code <0}. */ @Override public Handle action(ActionAST action) { //System.out.println("action: "+action); ATNState left = newState(action); ATNState right = newState(action); ActionTransition a = new ActionTransition(right, currentRule.index); left.addTransition(a); action.atnState = left; return new Handle(left, right); }
protected Handle action(GrammarAST node, LexerAction lexerAction) { ATNState left = newState(node); ATNState right = newState(node); boolean isCtxDependent = false; int lexerActionIndex = getLexerActionIndex(lexerAction); ActionTransition a = new ActionTransition(right, currentRule.index, lexerActionIndex, isCtxDependent); left.addTransition(a); node.atnState = left; Handle h = new Handle(left, right); return h; }
protected Handle action(GrammarAST node, LexerAction lexerAction) { ATNState left = newState(node); ATNState right = newState(node); boolean isCtxDependent = false; int lexerActionIndex = getLexerActionIndex(lexerAction); ActionTransition a = new ActionTransition(right, currentRule.index, lexerActionIndex, isCtxDependent); left.addTransition(a); node.atnState = left; Handle h = new Handle(left, right); return h; }
protected Handle action(GrammarAST node, LexerAction lexerAction) { ATNState left = newState(node); ATNState right = newState(node); boolean isCtxDependent = false; int lexerActionIndex = getLexerActionIndex(lexerAction); ActionTransition a = new ActionTransition(right, currentRule.index, lexerActionIndex, isCtxDependent); left.addTransition(a); node.atnState = left; Handle h = new Handle(left, right); return h; }
protected Handle action(GrammarAST node, LexerAction lexerAction) { ATNState left = newState(node); ATNState right = newState(node); boolean isCtxDependent = false; int lexerActionIndex = getLexerActionIndex(lexerAction); ActionTransition a = new ActionTransition(right, currentRule.index, lexerActionIndex, isCtxDependent); left.addTransition(a); node.atnState = left; Handle h = new Handle(left, right); return h; }
protected Handle action(GrammarAST node, LexerAction lexerAction) { ATNState left = newState(node); ATNState right = newState(node); boolean isCtxDependent = false; int lexerActionIndex = getLexerActionIndex(lexerAction); ActionTransition a = new ActionTransition(right, currentRule.index, lexerActionIndex, isCtxDependent); left.addTransition(a); node.atnState = left; Handle h = new Handle(left, right); return h; }
ActionTransition a = new ActionTransition(target, arg1, arg2, arg3 != 0); return a; case Transition.SET : return new SetTransition(target, sets.get(arg1));
ActionTransition a = new ActionTransition(target, arg1, arg2, arg3 != 0); return a; case Transition.SET : return new SetTransition(target, sets.get(arg1));
ActionTransition a = new ActionTransition(target, arg1, arg2, arg3 != 0); return a; case Transition.SET : return new SetTransition(target, sets.get(arg1));
/** Build what amounts to an epsilon transition with an action. * The action goes into ATN though it is ignored during prediction * if {@link ActionTransition#actionIndex actionIndex}{@code <0}. */ @NotNull @Override public Handle action(@NotNull ActionAST action) { //System.out.println("action: "+action); ATNState left = newState(action); ATNState right = newState(action); ActionTransition a = new ActionTransition(right, currentRule.index); left.addTransition(a); action.atnState = left; return new Handle(left, right); }