Examples of TokenListDecl


Examples of org.antlr.v4.codegen.model.decl.TokenListDecl

      String label = labelAST.getText();
      RuleFunction rf = getCurrentRuleFunction();
      if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) {
        // add Token _X and List<Token> X decls
        defineImplicitLabel(ID, matchOp); // adds _X
        TokenListDecl l = getTokenListLabelDecl(label);
        rf.addContextDecl(ID.getAltLabel(), l);
      }
      else {
        Decl d = getTokenLabelDecl(label);
        matchOp.labels.add(d);
View Full Code Here

Examples of org.antlr.v4.codegen.model.decl.TokenListDecl

  public Decl getTokenLabelDecl(String label) {
    return new TokenDecl(this, label);
  }

  public TokenListDecl getTokenListLabelDecl(String label) {
    return new TokenListDecl(this, gen.getTarget().getListLabel(label));
  }
View Full Code Here

Examples of org.antlr.v4.codegen.model.decl.TokenListDecl

    if ( labelAST!=null ) {
      String label = labelAST.getText();
      RuleFunction rf = getCurrentRuleFunction();
      if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) {
        defineImplicitLabel(setAST, matchOp);
        TokenListDecl l = getTokenListLabelDecl(label);
        rf.addContextDecl(setAST.getAltLabel(), l);
      }
      else {
        Decl d = getTokenLabelDecl(label);
        matchOp.labels.add(d);
View Full Code Here

Examples of org.antlr.v4.codegen.model.decl.TokenListDecl

      String label = labelAST.getText();
      Decl d = getTokenLabelDecl(label);
      wild.labels.add(d);
      getCurrentRuleFunction().addContextDecl(ast.getAltLabel(), d);
      if ( labelAST.parent.getType() == ANTLRParser.PLUS_ASSIGN ) {
        TokenListDecl l = getTokenListLabelDecl(label);
        getCurrentRuleFunction().addContextDecl(ast.getAltLabel(), l);
      }
    }
    if ( controller.needsImplicitLabel(ast, wild) ) defineImplicitLabel(ast, wild);
    AddToLabelList listLabelOp = getAddToListOpIfListLabelPresent(wild, labelAST);
View Full Code Here

Examples of org.antlr.v4.codegen.model.decl.TokenListDecl

      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;
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.