Examples of accept()


Examples of hampi.grammars.Grammar.accept()

  }

  public void testReplace1() throws Exception{
    Grammar g = new Parser(DIR + "test_replace1.txt").parse();
    GrammarElementReplacer ger = new GrammarElementReplacer(g.getNonterminal("X"), g.getNonterminal("S"));
    g.accept(ger);
    compareIgnoreNewlines(g.toString(), DIR + "test_replace1_expected.txt");
  }

  //----------------------------------------------------------------------
  private Grammar checkNonCNF(String string, String start) throws IOException{
View Full Code Here

Examples of helloworld.behavioral.visitor.HelloWorldCharacterElements.accept()

        System.out.println(templateMethodHelloWorld.helloWorld());

        System.out.println("23. Visitor: ");
        HelloWorldCharacterElements helloWorldCharacterElements = new HelloWorldCharacterElements("Hello Visitor!".toCharArray());
        HelloWorldCharacterVisitor helloWorldCharacterVisitor = new HelloWorldCharacterVisitor();
        helloWorldCharacterElements.accept(helloWorldCharacterVisitor);
        System.out.println(helloWorldCharacterVisitor.helloWorld());

    }
}
View Full Code Here

Examples of hu.jokeman.xparser.document.XMLNode.accept()

        XMLNodeIterator nodeIt = anElement.children ();
        int attrCount = 0;
        while (nodeIt.hasNext ()) {
            XMLNode child = nodeIt.next ();
            if (child instanceof XMLAttribute) {
                child.accept (this);
                attrCount++;
            }
        }

        if (attrCount == anElement.childCount ()) {
View Full Code Here

Examples of hu.jokeman.xparser.document.nodes.XMLDocument.accept()

            // dokumentumgy�k�r elk�r�se
            XMLDocument doc = builder.getDocument ();

            // white space takar�t�s
            WhiteSpaceNormalizer wsn = new WhiteSpaceNormalizer ();
            doc.accept (wsn);

            // fa-alak� kiirat�s
            System.out.println ("Feldolgozott adatok kiiratva:");
            System.out.println ();
            TreePrinter tp = new TreePrinter (System.out);
View Full Code Here

Examples of io.crate.sql.tree.Expression.accept()

    private SubscriptContext analyzeSubscript(String expressionString) {
        Analyzer.ParameterContext parameterContext = mock(Analyzer.ParameterContext.class);
        when(parameterContext.getAsSymbol(anyInt())).thenReturn(new Parameter(currentParameter));
        SubscriptContext context = new SubscriptContext(parameterContext);
        Expression expression = SqlParser.createExpression(expressionString);
        expression.accept(visitor, context);
        return context;
    }

    @Test
    public void testVisitSubscriptExpression() throws Exception {
View Full Code Here

Examples of io.druid.query.search.search.SearchQuerySpec.accept()

        final BitmapIndex bitmapIndex = column.getBitmapIndex();
        if (bitmapIndex != null) {
          for (int i = 0; i < bitmapIndex.getCardinality(); ++i) {
            String dimVal = Strings.nullToEmpty(bitmapIndex.getValue(i));
            if (searchQuerySpec.accept(dimVal) &&
                bitmapFactory.intersection(Arrays.asList(baseFilter, bitmapIndex.getBitmap(i))).size() > 0) {
              retVal.add(new SearchHit(dimension, dimVal));
              if (retVal.size() >= limit) {
                return makeReturnResult(limit, retVal);
              }
View Full Code Here

Examples of it.unibz.instasearch.indexing.querying.VisitableQuery.accept()

      query = parserSearchString(searchString, new KeywordAnalyzer()); // searchstring is one term
    }
   
    VisitableQuery visitableQuery = new VisitableQuery(query);
   
    visitableQuery.accept(uppercaseNameExpander);
    visitableQuery.accept(fileNameSearcher);
   
    query = visitableQuery.getQuery();
   
    return query;
View Full Code Here

Examples of it.unimi.dsi.mg4j.query.nodes.Consecutive.accept()

  }

  public void testQuery() throws IOException, QueryBuilderVisitorException {
    Query query = new Consecutive( new Term( "a" ), new Remap( new Select( "index1", new Term( "b" ) ), new CharSequence[] { "index1" }, new CharSequence[] { "index0" } ) );
    DocumentIteratorBuilderVisitor documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( indexMap, index0, Integer.MAX_VALUE );
    DocumentIterator documentIterator = query.accept( documentIteratorBuilderVisitor );
    assertTrue( documentIterator.hasNext() );
    assertEquals( 0, documentIterator.nextDocument() );
    IntervalIterator intervalIterator = documentIterator.intervalIterator( index0 );
    assertEquals( it.unimi.dsi.util.Interval.valueOf( 0, 1 ), intervalIterator.nextInterval() );
    assertFalse( intervalIterator.hasNext() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.query.nodes.Query.accept()

  }

  public void testQuery() throws IOException, QueryBuilderVisitorException {
    Query query = new Consecutive( new Term( "a" ), new Remap( new Select( "index1", new Term( "b" ) ), new CharSequence[] { "index1" }, new CharSequence[] { "index0" } ) );
    DocumentIteratorBuilderVisitor documentIteratorBuilderVisitor = new DocumentIteratorBuilderVisitor( indexMap, index0, Integer.MAX_VALUE );
    DocumentIterator documentIterator = query.accept( documentIteratorBuilderVisitor );
    assertTrue( documentIterator.hasNext() );
    assertEquals( 0, documentIterator.nextDocument() );
    IntervalIterator intervalIterator = documentIterator.intervalIterator( index0 );
    assertEquals( it.unimi.dsi.util.Interval.valueOf( 0, 1 ), intervalIterator.nextInterval() );
    assertFalse( intervalIterator.hasNext() );
View Full Code Here

Examples of it.unimi.dsi.mg4j.search.DocumentIterator.accept()

        for (int document = 0; document < index.numberOfDocuments; document++) {
            currDoc[ 0 ] = iterator.skipTo(document);

            if (document == currDoc[ 0 ]) {
               iterator.accept(visitor); // see method visit below.
            }
        }

       
        while( iterator.hasNext() ) {
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.