Package org.opentripplanner.routing.automata

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


    }

    //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

        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

TOP

Related Classes of org.opentripplanner.routing.automata.Nonterminal

Copyright © 2018 www.massapicom. 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.