public static List<ActionChunk> translateActionChunk(OutputModelFactory factory, RuleFunction rf, String action, ActionAST node) { Token tokenWithinAction = node.token; ActionTranslator translator = new ActionTranslator(factory, node); translator.rf = rf; factory.getGrammar().tool.log("action-translator", "translate " + action); String altLabel = node.getAltLabel(); if ( rf!=null ) { translator.nodeContext = rf.ruleCtx; if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel); } ANTLRStringStream in = new ANTLRStringStream(action); in.setLine(tokenWithinAction.getLine()); in.setCharPositionInLine(tokenWithinAction.getCharPositionInLine()); ActionSplitter trigger = new ActionSplitter(in, translator); // forces eval, triggers listener methods trigger.getActionTokens(); return translator.chunks; }
public static List<ActionChunk> translateActionChunk(OutputModelFactory factory, RuleFunction rf, String action, ActionAST node) { Token tokenWithinAction = node.token; ActionTranslator translator = new ActionTranslator(factory, node); translator.rf = rf; factory.getGrammar().tool.log("action-translator", "translate " + action); String altLabel = node.getAltLabel(); if ( rf!=null ) { translator.nodeContext = rf.ruleCtx; if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel); } ANTLRStringStream in = new ANTLRStringStream(action); in.setLine(tokenWithinAction.getLine()); in.setCharPositionInLine(tokenWithinAction.getCharPositionInLine()); ActionSplitter trigger = new ActionSplitter(in, translator); // forces eval, triggers listener methods trigger.getActionTokens(); return translator.chunks; }
public static List<ActionChunk> translateActionChunk(OutputModelFactory factory, RuleFunction rf, String action, ActionAST node) { Token tokenWithinAction = node.token; ActionTranslator translator = new ActionTranslator(factory, node); translator.rf = rf; factory.getGrammar().tool.log("action-translator", "translate " + action); String altLabel = node.getAltLabel(); if ( rf!=null ) translator.nodeContext = rf.ruleCtx; if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel); ANTLRStringStream in = new ANTLRStringStream(action); in.setLine(tokenWithinAction.getLine()); in.setCharPositionInLine(tokenWithinAction.getCharPositionInLine()); ActionSplitter trigger = new ActionSplitter(in, translator); // forces eval, triggers listener methods trigger.getActionTokens(); return translator.chunks; }
public static List<ActionChunk> translateActionChunk(OutputModelFactory factory, RuleFunction rf, String action, ActionAST node) { Token tokenWithinAction = node.token; ActionTranslator translator = new ActionTranslator(factory, node); translator.rf = rf; factory.getGrammar().tool.log("action-translator", "translate " + action); String altLabel = node.getAltLabel(); if ( rf!=null ) { translator.nodeContext = rf.ruleCtx; if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel); } ANTLRStringStream in = new ANTLRStringStream(action); in.setLine(tokenWithinAction.getLine()); in.setCharPositionInLine(tokenWithinAction.getCharPositionInLine()); ActionSplitter trigger = new ActionSplitter(in, translator); // forces eval, triggers listener methods trigger.getActionTokens(); return translator.chunks; }
public static List<ActionChunk> translateActionChunk(OutputModelFactory factory, RuleFunction rf, String action, ActionAST node) { Token tokenWithinAction = node.token; ActionTranslator translator = new ActionTranslator(factory, node); translator.rf = rf; factory.getGrammar().tool.log("action-translator", "translate " + action); String altLabel = node.getAltLabel(); if ( rf!=null ) { translator.nodeContext = rf.ruleCtx; if ( altLabel!=null ) translator.nodeContext = rf.altLabelCtxs.get(altLabel); } ANTLRStringStream in = new ANTLRStringStream(action); in.setLine(tokenWithinAction.getLine()); in.setCharPositionInLine(tokenWithinAction.getCharPositionInLine()); ActionSplitter trigger = new ActionSplitter(in, translator); // forces eval, triggers listener methods trigger.getActionTokens(); return translator.chunks; }