Examples of AddToLabelList


Examples of org.antlr.v4.codegen.model.AddToLabelList

  @Override
  public List<SrcOp> ruleRef(GrammarAST ID, GrammarAST label, GrammarAST args) {
    InvokeRule invokeOp = new InvokeRule(this, ID, label);
    // If no manual label and action refs as token/rule not label, we need to define implicit label
    if ( controller.needsImplicitLabel(ID, invokeOp) ) defineImplicitLabel(ID, invokeOp);
    AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(invokeOp, label);
    return list(invokeOp, listLabelOp);
  }
View Full Code Here

Examples of org.antlr.v4.codegen.model.AddToLabelList

//        TokenListDecl l = getTokenListLabelDecl(label);
//        getCurrentRuleFunction().addContextDecl(ID.getAltLabel(), l);
//      }
    }
    if ( controller.needsImplicitLabel(ID, matchOp) ) defineImplicitLabel(ID, matchOp);
    AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(matchOp, labelAST);
    return list(matchOp, listLabelOp);
  }
View Full Code Here

Examples of org.antlr.v4.codegen.model.AddToLabelList

        matchOp.labels.add(d);
        rf.addContextDecl(setAST.getAltLabel(), d);
      }
    }
    if ( controller.needsImplicitLabel(setAST, matchOp) ) defineImplicitLabel(setAST, matchOp);
    AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(matchOp, labelAST);
    return list(matchOp, listLabelOp);
  }
View Full Code Here

Examples of org.antlr.v4.codegen.model.AddToLabelList

        TokenListDecl l = getTokenListLabelDecl(label);
        getCurrentRuleFunction().addContextDecl(ast.getAltLabel(), l);
      }
    }
    if ( controller.needsImplicitLabel(ast, wild) ) defineImplicitLabel(ast, wild);
    AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(wild, labelAST);
    return list(wild, listLabelOp);
  }
View Full Code Here

Examples of org.antlr.v4.codegen.model.AddToLabelList

    // all labels must be in scope struct in case we exec action out of context
    getCurrentRuleFunction().addContextDecl(ast.getAltLabel(), d);
  }

  public AddToLabelList getAddToListOpIfListLabelPresent(LabeledOp op, GrammarAST label) {
    AddToLabelList labelOp = null;
    if ( label!=null && label.parent.getType()==ANTLRParser.PLUS_ASSIGN ) {
      String listLabel = gen.getTarget().getListLabel(label.getText());
      labelOp = new AddToLabelList(this, listLabel, op.getLabels().get(0));
    }
    return labelOp;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.