src/main/java/com/basistech/tclre/Nfa.java
void pushfwd() throws RegexException {
        State s;
        State nexts;
        Arc a;
        Arc nexta;
        boolean progress;

    /* find and push until there are no more */
        do {
            progress = false;
            for (s = states; s != null; s = nexts) {
                nexts = s.next;
                for (a = s.ins; a != null; a = nexta) {
                    nexta = a.inchain;
                    if (a.type == '$' || a.type == Compiler.AHEAD) {
                        if (push(a)) {
                            progress = true;
                        }
                    }
                    assert nexta == null || s.no != State.FREESTATE;
                }
            }
            if (progress) {
                dumpnfa();
            }
        } while (progress);

        for (a = post.ins; a != null; a = nexta) {
            nexta = a.inchain;
            if (a.type == '$') {
                assert a.co == 0 || a.co == 1;
                newarc(Compiler.PLAIN, eos[a.co], a.from, a.to);
                freearc(a);
            }
        }
    }
void pushfwd() throws RegexException {
        State s;
        State nexts;
        Arc a;
        Arc nexta;
        boolean progress;

    /* find and push until there are no more */
        do {
            progress = false;
            for (s = states; s != null; s = nexts) {
                nexts = s.next;
                for (a = s.ins; a != null; a = nexta) {
                    nexta = a.inchain;
                    if (a.type == '$' || a.type == Compiler.AHEAD) {
                        if (push(a)) {
                            progress = true;
                        }
                    }
                    assert nexta == null || s.no != State.FREESTATE;
                }
            }
            if (progress) {
                dumpnfa();
            }
        } while (progress);

        for (a = post.ins; a != null; a = nexta) {
            nexta = a.inchain;
            if (a.type == '$') {
                assert a.co == 0 || a.co == 1;
                newarc(Compiler.PLAIN, eos[a.co], a.from, a.to);
                freearc(a);
            }
        }
    }
void pushfwd ( ) throws RegexException { State s ; State nexts ; Arc a ; Arc nexta ; boolean progress ; /* find and push until there are no more */ do { progress = false ; for ( s = states ; s != null ; s = nexts ) { nexts = s . next ; for ( a = s . ins ; a != null ; a = nexta ) { nexta = a . inchain ; if ( a . type == ' ' || a . type == Compiler . AHEAD ) { if ( push ( a ) ) { progress = true ; } } assert nexta == null || s . no != State . FREESTATE ; } } if ( progress ) { dumpnfa ( ) ; } } while ( progress ) ; for ( a = post . ins ; a != null ; a = nexta ) { nexta = a . inchain ; if ( a . type == ' ' ) { assert a . co == 0 || a . co == 1 ; newarc ( Compiler . PLAIN , eos [ a . co ] , a . from , a . to ) ; freearc ( a ) ; } } }
pushfwd - push forward constraints forward to (with luck) eliminate them
pushfwd - push forward constraints forward to ( with luck ) eliminate them