Examples of removeDeadTransitions()


Examples of dk.brics.automaton.Automaton.removeDeadTransitions()

     * Returns an automaton accepting every substring of every string accepted by the
     * specified automaton.
     */
    public static Automaton getSubstringsOf(Automaton automaton) {
        Automaton result = automaton.clone();
        result.removeDeadTransitions();
        Collection<StatePair> epsilons = new ArrayList<StatePair>();
        for (State state : result.getStates()) {
            state.setAccept(true);
            if (state != result.getInitialState()) {
                epsilons.add(new StatePair(result.getInitialState(), state));
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.