Examples of NonTerminal


Examples of org.maltparserx.core.syntaxgraph.node.NonTerminal

  public int nTerminalNode() {
    return nTokenNode();
  }
 
  public PhraseStructureNode addNonTerminalNode(int index) throws MaltChainedException {
    NonTerminal node = nonTerminalPool.checkOut();
    node.setIndex(index);
    node.setBelongsToGraph(this);
    nonTerminalNodes.put(index,node);
    return node;
  }
View Full Code Here

Examples of org.maltparserx.core.syntaxgraph.node.NonTerminal

      public void resetObject(Edge o) throws MaltChainedException { o.clear(); }
    };
   
    nonTerminalNodes = new TreeMap<Integer,NonTerminal>();
    nonTerminalPool = new ObjectPoolList<NonTerminal>() {
      protected NonTerminal create() throws MaltChainedException { return new NonTerminal(); }
      public void resetObject(NonTerminal o) throws MaltChainedException { o.clear(); }
    };
  }
View Full Code Here

Examples of org.maltparserx.core.syntaxgraph.node.NonTerminal

  public int nTerminalNode() {
    return nTokenNode();
  }
 
  public PhraseStructureNode addNonTerminalNode(int index) throws MaltChainedException {
    NonTerminal node = nonTerminalPool.checkOut();
    node.setIndex(index);
    node.setBelongsToGraph(this);
    nonTerminalNodes.put(index,node);
    return node;
  }
View Full Code Here

Examples of org.opentripplanner.routing.automata.Nonterminal

    static final int THRU = 1;

    private Nonterminal itinerary;
   
    public void setUp() {
        Nonterminal walkLeg = plus(WALK);
        Nonterminal transitLeg = plus(plus(STATION), plus(TRANSIT), plus(STATION));
        itinerary = seq(walkLeg, star(transitLeg, walkLeg));
    }
View Full Code Here

Examples of org.opentripplanner.routing.automata.Nonterminal

    }

    //this one tests the choice method
    public void testAutomata2() {
        Nonterminal any = choice(WALK,STATION,TRANSIT);
        NFA nfa = choice(star(WALK), seq(star(any), TRANSIT, star(any))).toNFA();
        System.out.print(nfa.toGraphViz());
        DFA dfa = new DFA(nfa);
        testParse(dfa);
        nfa = nfa.reverse().reverse().reverse().reverse();
View Full Code Here

Examples of org.opentripplanner.routing.automata.Nonterminal

        private static final int LINK   = 2;

        private final DFA DFA;

        Parser() {
            Nonterminal streets   = star(STREET);

            Nonterminal itinerary = seq(LINK, streets, LINK);

            DFA = itinerary.toDFA().minimize();
        }
View Full Code Here

Examples of org.rascalmpl.ast.Nonterminal

    if (symbol.isOptional()) {
      return factory.constructor(Factory.Symbol_Opt, symbolAST2SymbolConstructor(symbol.getSymbol(), lex, layout));
    }
   
    if (symbol.isStart()) {
      Nonterminal nonterminal = symbol.getNonterminal();
      return factory.constructor(Factory.Symbol_Start_Sort, factory.constructor(Factory.Symbol_Sort, factory.string(((Nonterminal.Lexical) nonterminal).getString())))
    }
    if (symbol.isNonterminal()) {
      Nonterminal nonterminal = symbol.getNonterminal();
      IString name = factory.string(((Nonterminal.Lexical) nonterminal).getString());
      if (lex) {
        return factory.constructor(Factory.Symbol_Lex, name);
      }
      else {
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.