Examples of ActionAST


Examples of org.antlr.v4.tool.ast.ActionAST

                        new AttributeChecks(g, r, alt, a, a.token);
                    checker.examineAction();
                }
            }
            for (GrammarAST e : r.exceptions) {
        ActionAST a = (ActionAST)e.getChild(1);
                AttributeChecks checker = new AttributeChecks(g, r, null, a, a.token);
                checker.examineAction();
      }
      if ( r.finallyAction!=null ) {
        AttributeChecks checker =
View Full Code Here

Examples of org.antlr.v4.tool.ast.ActionAST

    // walk alt info records and set their altAST to point to appropriate ALT subtree
    // from freshly created AST
    setAltASTPointers(r, t);

    // update Rule to just one alt and add prec alt
    ActionAST arg = (ActionAST)r.ast.getFirstChildWithType(ANTLRParser.ARG_ACTION);
    if ( arg!=null ) {
      r.args = ScopeParser.parseTypedArgList(arg, arg.getText(), g);
      r.args.type = AttributeDict.DictType.ARG;
      r.args.ast = arg;
      arg.resolver = r.alt[1]; // todo: isn't this Rule or something?
    }
View Full Code Here

Examples of org.antlr.v4.tool.ast.ActionAST

      r.locals.ast = locals;
    }

    for (GrammarAST a : actions) {
      // a = ^(AT ID ACTION)
      ActionAST action = (ActionAST) a.getChild(1);
      r.namedActions.put(a.getChild(0).getText(), action);
      action.resolver = r;
    }
  }
View Full Code Here

Examples of org.antlr.v4.tool.ast.ActionAST

  public String getPredicateDisplayString(SemanticContext.Predicate pred) {
    if ( indexToPredMap==null ) {
      indexToPredMap = getIndexToPredicateMap();
    }
    ActionAST actionAST = indexToPredMap.get(pred.predIndex);
    return actionAST.getText();
  }
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.