public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void processNested(Token actionToken) { ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void processNested(Token actionToken) { ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void processNested(Token actionToken) { ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods splitter.getActionTokens(); }
public void processNested(Token actionToken) { ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods splitter.getActionTokens(); }
public void processNested(Token actionToken) { ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
public void examineAction() { //System.out.println("examine "+actionToken); ANTLRStringStream in = new ANTLRStringStream(actionToken.getText()); in.setLine(actionToken.getLine()); in.setCharPositionInLine(actionToken.getCharPositionInLine()); ActionSplitter splitter = new ActionSplitter(in, this); // forces eval, triggers listener methods node.chunks = splitter.getActionTokens(); }
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 boolean actionIsContextDependent(ActionAST actionAST) { ANTLRStringStream in = new ANTLRStringStream(actionAST.token.getText()); in.setLine(actionAST.token.getLine()); in.setCharPositionInLine(actionAST.token.getCharPositionInLine()); final boolean[] dependent = new boolean[] {false}; // can't be simple bool with anon class ActionSplitterListener listener = new BlankActionSplitterListener() { @Override public void nonLocalAttr(String expr, Token x, Token y) { dependent[0] = true; } @Override public void qualifiedAttr(String expr, Token x, Token y) { dependent[0] = true; } @Override public void setAttr(String expr, Token x, Token rhs) { dependent[0] = true; } @Override public void setExprAttribute(String expr) { dependent[0] = true; } @Override public void setNonLocalAttr(String expr, Token x, Token y, Token rhs) { dependent[0] = true; } @Override public void attr(String expr, Token x) { dependent[0] = true; } }; ActionSplitter splitter = new ActionSplitter(in, listener); // forces eval, triggers listener methods splitter.getActionTokens(); return dependent[0]; }