public Action(OutputModelFactory factory, ActionAST ast) { super(factory,ast); RuleFunction rf = factory.getCurrentRuleFunction(); if (ast != null) { chunks = ActionTranslator.translateAction(factory, rf, ast.token, ast); } else { chunks = new ArrayList<ActionChunk>(); } //System.out.println("actions="+chunks); }
public Action(OutputModelFactory factory, ActionAST ast) { super(factory,ast); RuleFunction rf = factory.getCurrentRuleFunction(); if (ast != null) { chunks = ActionTranslator.translateAction(factory, rf, ast.token, ast); } else { chunks = new ArrayList<ActionChunk>(); } //System.out.println("actions="+chunks); }
public Action(OutputModelFactory factory, ActionAST ast) { super(factory,ast); RuleFunction rf = factory.getCurrentRuleFunction(); if (ast != null) { chunks = ActionTranslator.translateAction(factory, rf, ast.token, ast); } else { chunks = new ArrayList<ActionChunk>(); } //System.out.println("actions="+chunks); }
public Action(OutputModelFactory factory, ActionAST ast) { super(factory,ast); RuleFunction rf = factory.getCurrentRuleFunction(); if (ast != null) { chunks = ActionTranslator.translateAction(factory, rf, ast.token, ast); } else { chunks = new ArrayList<ActionChunk>(); } //System.out.println("actions="+chunks); }
public SrcOp(OutputModelFactory factory, GrammarAST ast) { super(factory,ast); if ( ast!=null ) uniqueID = ast.token.getTokenIndex(); enclosingBlock = factory.getCurrentBlock(); enclosingRuleRunction = factory.getCurrentRuleFunction(); }
public SrcOp(OutputModelFactory factory, GrammarAST ast) { super(factory,ast); if ( ast!=null ) uniqueID = ast.token.getTokenIndex(); enclosingBlock = factory.getCurrentBlock(); enclosingRuleRunction = factory.getCurrentRuleFunction(); }
public SrcOp(OutputModelFactory factory, GrammarAST ast) { super(factory,ast); if ( ast!=null ) uniqueID = ast.token.getTokenIndex(); enclosingBlock = factory.getCurrentBlock(); enclosingRuleRunction = factory.getCurrentRuleFunction(); }
public SrcOp(OutputModelFactory factory, GrammarAST ast) { super(factory,ast); if ( ast!=null ) uniqueID = ast.token.getTokenIndex(); enclosingBlock = factory.getCurrentBlock(); enclosingRuleRunction = factory.getCurrentRuleFunction(); }
public SrcOp(OutputModelFactory factory, GrammarAST ast) { super(factory,ast); if ( ast!=null ) uniqueID = ast.token.getTokenIndex(); enclosingBlock = factory.getCurrentBlock(); enclosingRuleRunction = factory.getCurrentRuleFunction(); }
public Action(OutputModelFactory factory, StructDecl ctx, String action) { super(factory,null); ActionAST ast = new ActionAST(new CommonToken(ANTLRParser.ACTION, action)); RuleFunction rf = factory.getCurrentRuleFunction(); if ( rf!=null ) { // we can translate ast.resolver = rf.rule; chunks = ActionTranslator.translateActionChunk(factory, rf, action, ast); } else { chunks = new ArrayList<ActionChunk>(); chunks.add(new ActionText(ctx, action)); } }
public TestSetInline addCodeForLookaheadTempVar(IntervalSet look) { List<SrcOp> testOps = factory.getLL1Test(look, ast); TestSetInline expr = Utils.find(testOps, TestSetInline.class); if (expr != null) { Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); CaptureNextTokenType nextType = new CaptureNextTokenType(factory,expr.varName); addPreambleOp(nextType); } return expr; }
public TestSetInline addCodeForLookaheadTempVar(IntervalSet look) { List<SrcOp> testOps = factory.getLL1Test(look, ast); TestSetInline expr = Utils.find(testOps, TestSetInline.class); if (expr != null) { Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); CaptureNextTokenType nextType = new CaptureNextTokenType(factory,expr.varName); addPreambleOp(nextType); } return expr; }
public TestSetInline addCodeForLookaheadTempVar(IntervalSet look) { List<SrcOp> testOps = factory.getLL1Test(look, ast); TestSetInline expr = Utils.find(testOps, TestSetInline.class); if (expr != null) { Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); CaptureNextTokenType nextType = new CaptureNextTokenType(factory,expr.varName); addPreambleOp(nextType); } return expr; }
public TestSetInline addCodeForLookaheadTempVar(IntervalSet look) { List<SrcOp> testOps = factory.getLL1Test(look, ast); TestSetInline expr = Utils.find(testOps, TestSetInline.class); if (expr != null) { Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); CaptureNextTokenType nextType = new CaptureNextTokenType(factory,expr.varName); addPreambleOp(nextType); } return expr; }
public TestSetInline addCodeForLookaheadTempVar(IntervalSet look) { List<SrcOp> testOps = factory.getLL1Test(look, ast); TestSetInline expr = Utils.find(testOps, TestSetInline.class); if (expr != null) { Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); CaptureNextTokenType nextType = new CaptureNextTokenType(factory,expr.varName); addPreambleOp(nextType); } return expr; }
public MatchSet(OutputModelFactory factory, GrammarAST ast) { super(factory, ast); SetTransition st = (SetTransition)ast.atnState.transition(0); int wordSize = factory.getGenerator().getTarget().getInlineTestSetWordSize(); expr = new TestSetInline(factory, null, st.set, wordSize); Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); capture = new CaptureNextTokenType(factory,expr.varName); } }
public MatchSet(OutputModelFactory factory, GrammarAST ast) { super(factory, ast); SetTransition st = (SetTransition)ast.atnState.transition(0); int wordSize = factory.getGenerator().getTarget().getInlineTestSetWordSize(); expr = new TestSetInline(factory, null, st.set, wordSize); Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); capture = new CaptureNextTokenType(factory,expr.varName); } }
public MatchSet(OutputModelFactory factory, GrammarAST ast) { super(factory, ast); SetTransition st = (SetTransition)ast.atnState.transition(0); int wordSize = factory.getGenerator().getTarget().getInlineTestSetWordSize(); expr = new TestSetInline(factory, null, st.set, wordSize); Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); capture = new CaptureNextTokenType(factory,expr.varName); } }
public MatchSet(OutputModelFactory factory, GrammarAST ast) { super(factory, ast); SetTransition st = (SetTransition)ast.atnState.transition(0); int wordSize = factory.getGenerator().getTarget().getInlineTestSetWordSize(); expr = new TestSetInline(factory, null, st.set, wordSize); Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); capture = new CaptureNextTokenType(factory,expr.varName); } }
public MatchSet(OutputModelFactory factory, GrammarAST ast) { super(factory, ast); SetTransition st = (SetTransition)ast.atnState.transition(0); int wordSize = factory.getGenerator().getTarget().getInlineTestSetWordSize(); expr = new TestSetInline(factory, null, st.set, wordSize); Decl d = new TokenTypeDecl(factory, expr.varName); factory.getCurrentRuleFunction().addLocalDecl(d); capture = new CaptureNextTokenType(factory,expr.varName); } }