@Override public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST) { int decision = ((DecisionState)blkAST.atnState).decision; Choice c; if ( !g.tool.force_atn && AnalysisPipeline.disjoint(g.decisionLOOK.get(decision)) ) { c = getLL1ChoiceBlock(blkAST, alts); } else { c = getComplexChoiceBlock(blkAST, alts); } if ( labelAST!=null ) { // for x=(...), define x or x_list String label = labelAST.getText(); Decl d = getTokenLabelDecl(label); c.label = d; getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), d); if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) { String listLabel = gen.getTarget().getListLabel(label); TokenListDecl l = new TokenListDecl(this, listLabel); getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), l); } } return c; }
@Override public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST) { int decision = ((DecisionState)blkAST.atnState).decision; Choice c; if ( !g.tool.force_atn && AnalysisPipeline.disjoint(g.decisionLOOK.get(decision)) ) { c = getLL1ChoiceBlock(blkAST, alts); } else { c = getComplexChoiceBlock(blkAST, alts); } if ( labelAST!=null ) { // for x=(...), define x or x_list String label = labelAST.getText(); Decl d = getTokenLabelDecl(label); c.label = d; getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), d); if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) { String listLabel = getTarget().getListLabel(label); TokenListDecl l = new TokenListDecl(this, listLabel); getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), l); } } return c; }
@Override public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST) { int decision = ((DecisionState)blkAST.atnState).decision; Choice c; if ( !g.tool.force_atn && AnalysisPipeline.disjoint(g.decisionLOOK.get(decision)) ) { c = getLL1ChoiceBlock(blkAST, alts); } else { c = getComplexChoiceBlock(blkAST, alts); } if ( labelAST!=null ) { // for x=(...), define x or x_list String label = labelAST.getText(); Decl d = getTokenLabelDecl(label); c.label = d; getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), d); if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) { String listLabel = gen.getTarget().getListLabel(label); TokenListDecl l = new TokenListDecl(this, listLabel); getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), l); } } return c; }
@Override public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST) { int decision = ((DecisionState)blkAST.atnState).decision; Choice c; if ( !g.tool.force_atn && AnalysisPipeline.disjoint(g.decisionLOOK.get(decision)) ) { c = getLL1ChoiceBlock(blkAST, alts); } else { c = getComplexChoiceBlock(blkAST, alts); } if ( labelAST!=null ) { // for x=(...), define x or x_list String label = labelAST.getText(); Decl d = getTokenLabelDecl(label); c.label = d; getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), d); if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) { String listLabel = gen.getTarget().getListLabel(label); TokenListDecl l = new TokenListDecl(this, listLabel); getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), l); } } return c; }
@Override public Choice getChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts, GrammarAST labelAST) { int decision = ((DecisionState)blkAST.atnState).decision; Choice c; if ( !g.tool.force_atn && AnalysisPipeline.disjoint(g.decisionLOOK.get(decision)) ) { c = getLL1ChoiceBlock(blkAST, alts); } else { c = getComplexChoiceBlock(blkAST, alts); } if ( labelAST!=null ) { // for x=(...), define x or x_list String label = labelAST.getText(); Decl d = getTokenLabelDecl(label); c.label = d; getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), d); if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) { String listLabel = gen.getTarget().getListLabel(label); TokenListDecl l = new TokenListDecl(this, listLabel); getCurrentRuleFunction().addContextDecl(labelAST.getAltLabel(), l); } } return c; }