Examples of visit()


Examples of net.sourceforge.htmlunit.corejs.javascript.ast.AstRoot.visit()

    private String instrument(final int lineNumber, final ScriptData data) {
        final Parser parser = new Parser();

        final String sourceUriAsString = data.getSourceUriAsString();
        final AstRoot root = parser.parse(data.getSourceCode(), sourceUriAsString, lineNumber);
        root.visit(new InstrumentingNodeVisitor(data, lineNumber - 1));

        final String treeSource = root.toSource();
        final StringBuilder buf = new StringBuilder(
                INITIALIZING_CODE.length() +
                data.getNumberOfStatements() * ARRAY_INITIALIZER.length() +
View Full Code Here

Examples of nexj.core.meta.Metaclass.visit()

   {
      for (Iterator itr = metadata.getMetaclassIterator(); itr.hasNext();)
      {
         final Metaclass metaclass = (Metaclass)itr.next();

         metaclass.visit(new PersistenceMapping.Visitor()
         {
            public void visit(PersistenceMapping mapping)
            {
               if (mapping instanceof RelationalMapping)
               {
View Full Code Here

Examples of nexj.core.persistence.Operator.visit()

      {
         Operator op = m_operandArray[i];

         if (visitor.isEligible(op))
         {
            if (!op.visit(visitor, nFlags))
            {
               return false;
            }
         }
      }
View Full Code Here

Examples of org.antlr.runtime.tree.TreeVisitor.visit()

     *  Parameter must be a token.
     *  todo: do we want?
     */
    public void expandParameterizedLoops(GrammarAST root) {
        TreeVisitor v = new TreeVisitor(new GrammarASTAdaptor());
        v.visit(root, new TreeVisitorAction() {
            @Override
            public Object pre(Object t) {
                if ( ((GrammarAST)t).getType() == 3 ) {
                    return expandParameterizedLoop((GrammarAST)t);
                }
View Full Code Here

Examples of org.antlr.runtime.tree.TreeWizard.visit()

  public static void validateNoLeadLagInValueBoundarySpec(ASTNode node)
      throws SemanticException {
    String errMsg = "Lead/Lag not allowed in ValueBoundary Spec";
    TreeWizard tw = new TreeWizard(ParseDriver.adaptor, HiveParser.tokenNames);
    ValidateNoLeadLag visitor = new ValidateNoLeadLag(errMsg);
    tw.visit(node, HiveParser.TOK_FUNCTION, visitor);
    visitor.checkValid();
  }

  public static class ValidateNoLeadLag implements ContextVisitor {
    String errMsg;
View Full Code Here

Examples of org.antlr.v4.semantics.BasicSemanticChecks.visit()

    ruleCollector.visit(t, "rule");
    BasicSemanticChecks basics = new BasicSemanticChecks(g, ruleCollector);
    // disable the assoc element option checks because they are already
    // handled for the pre-transformed rule.
    basics.checkAssocElementOption = false;
    basics.visit(t, "rule");

    // track recursive alt info for codegen
    r.recPrimaryAlts = new ArrayList<LeftRecursiveRuleAltInfo>();
    r.recPrimaryAlts.addAll(leftRecursiveRuleWalker.prefixAlts);
    r.recPrimaryAlts.addAll(leftRecursiveRuleWalker.otherAlts);
View Full Code Here

Examples of org.antlr.v4.semantics.RuleCollector.visit()

    transform.reduceBlocksToSets(r.ast);
    transform.expandParameterizedLoops(r.ast);

    // Rerun semantic checks on the new rule
    RuleCollector ruleCollector = new RuleCollector(g);
    ruleCollector.visit(t, "rule");
    BasicSemanticChecks basics = new BasicSemanticChecks(g, ruleCollector);
    // disable the assoc element option checks because they are already
    // handled for the pre-transformed rule.
    basics.checkAssocElementOption = false;
    basics.visit(t, "rule");
View Full Code Here

Examples of org.apache.accumulo.core.trace.SpanTree.visit()

    sb.append("<table><caption>");
    sb.append(String.format("<span class='table-caption'>Trace started at<br>%s</span></caption>", id, dateString(start)));
    sb.append("<tr><th>Time</th><th>Start</th><th>Service@Location</th><th>Name</th><th>Addl Data</th></tr>");
   
    final long finalStart = start;
    Set<Long> visited = tree.visit(new SpanTreeVisitor() {
      @Override
      public void visit(int level, RemoteSpan parent, RemoteSpan node, Collection<RemoteSpan> children) {
        sb.append("<tr>\n");
        sb.append(String.format("<td class='right'>%d+</td><td class='left'>%d</td>\n", node.stop - node.start, node.start - finalStart));
        sb.append(String.format("<td style='text-indent: %dpx'>%s@%s</td>\n", level * 5, node.svc, node.sender));
View Full Code Here

Examples of org.apache.accumulo.server.test.randomwalk.Module.visit()

   
    String confDir = acuHome + "/test/system/randomwalk/conf/";
    Framework.setConfigDir(confDir);
    try {
      Module module = new Module(new File(confDir + "modules/unit/Basic.xml"));
      module.visit(new State(new Properties()), new Properties());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 
View Full Code Here

Examples of org.apache.accumulo.test.randomwalk.Module.visit()

      return;
   
    String confDir = acuHome + "/test/system/randomwalk/conf/";
    try {
      Module module = new Module(new File(confDir + "modules/unit/Basic.xml"));
      module.visit(new State(new Properties()), new Properties());
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
 
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.