Examples of Decl


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

  }

  // support

  public void defineImplicitLabel(GrammarAST ast, LabeledOp op) {
    Decl d;
    if ( ast.getType()==ANTLRParser.SET || ast.getType()==ANTLRParser.WILDCARD ) {
      String implLabel =
        gen.getTarget().getImplicitSetLabel(String.valueOf(ast.token.getTokenIndex()));
      d = getTokenLabelDecl(implLabel);
      ((TokenDecl)d).isImplicit = true;
View Full Code Here

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

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

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

  public MatchSet(OutputModelFactory factory, GrammarAST ast) {
    super(factory, ast);
    SetTransition st = (SetTransition)ast.atnState.transition(0);
    expr = new TestSetInline(factory, null, st.set);
    Decl d = new TokenTypeDecl(factory, expr.varName);
    factory.getCurrentRuleFunction().addLocalDecl(d);
    capture = new CaptureNextTokenType(factory,expr.varName);
  }
View Full Code Here

Examples of wyrl.core.SpecFile.Decl

        matchEndLine();
      } else {
        Token lookahead = tokens.get(index);

        if(lookahead.text.equals("include")) {
          Decl id = parseIncludeDecl();
          // id can be null if the included file was already included
          // elsewhere.
          if(id != null) { decls.add(id); }
        } else if(lookahead.text.equals("term")) {
          decls.add(parseTermDecl());
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.