Package org.antlr.v4.automata

Examples of org.antlr.v4.automata.ParserATNFactory


//        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


        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

        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

    // 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

    return new LL1AltBlock(this, blkAST, alts);
  }

  @Override
  public Choice getComplexChoiceBlock(BlockAST blkAST, List<CodeBlockForAlt> alts) {
    return new AltBlock(this, blkAST, alts);
  }
View Full Code Here

  }

  @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);
View Full Code Here

  @Override
  public Choice getLL1EBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts) {
    int ebnf = 0;
    if ( ebnfRoot!=null ) ebnf = ebnfRoot.getType();
    Choice c = null;
    switch ( ebnf ) {
      case ANTLRParser.OPTIONAL :
        if ( alts.size()==1 ) c = new LL1OptionalBlockSingleAlt(this, ebnfRoot, alts);
        else c = new LL1OptionalBlock(this, ebnfRoot, alts);
        break;
View Full Code Here

  @Override
  public Choice getComplexEBNFBlock(GrammarAST ebnfRoot, List<CodeBlockForAlt> alts) {
    int ebnf = 0;
    if ( ebnfRoot!=null ) ebnf = ebnfRoot.getType();
    Choice c = null;
    switch ( ebnf ) {
      case ANTLRParser.OPTIONAL :
        c = new OptionalBlock(this, ebnfRoot, alts);
        break;
      case ANTLRParser.CLOSURE :
View Full Code Here

  }

  @Override
  public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) {
    if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt);
    return new CodeBlockForAlt(this);
  }
View Full Code Here

    return alternative(alt, outerMost);
  }

  @Override
  public CodeBlockForAlt alternative(Alternative alt, boolean outerMost) {
    if ( outerMost ) return new CodeBlockForOuterMostAlt(this, alt);
    return new CodeBlockForAlt(this);
  }
View Full Code Here

TOP

Related Classes of org.antlr.v4.automata.ParserATNFactory

Copyright © 2018 www.massapicom. 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.