src/main/java/com/basistech/tclre/Nfa.java
void dumparc(Arc a, State s, StringBuilder sb) {

        sb.append("\t");
        switch (a.type) {
        case Compiler.PLAIN:
            sb.append(String.format("[%d]", a.co));
            break;
        case Compiler.AHEAD:
            sb.append(String.format(">%d>", a.co));
            break;
        case Compiler.BEHIND:
            sb.append(String.format("<%d<", a.co));
            break;
        case Compiler.LACON:
            sb.append(String.format(":%d:", a.co));
            break;
        case '^':
        case '$':
            sb.append(String.format("%c%d", (char)a.type, a.co));
            break;
        case Compiler.EMPTY:
            break;
        default:
            sb.append(String.format("0x%x/0%d", a.type, a.co));
            break;
        }
        if (a.from != s) {
            sb.append(String.format("?%d?", a.from.no));
        }
        sb.append("->");
        if (a.to == null) {
            sb.append("null");
            Arc aa;
            for (aa = a.to.ins; aa != null; aa = aa.inchain) {
                if (aa == a) {
                    break;      /* NOTE BREAK OUT */
                }
            }
            if (aa == null) {
                LOG.debug("?!?");   /* missing from in-chain */
            }
        } else {
            sb.append(String.format("%d", a.to.no));
        }
    }
void dumparc(Arc a, State s, StringBuilder sb) {

        sb.append("\t");
        switch (a.type) {
        case Compiler.PLAIN:
            sb.append(String.format("[%d]", a.co));
            break;
        case Compiler.AHEAD:
            sb.append(String.format(">%d>", a.co));
            break;
        case Compiler.BEHIND:
            sb.append(String.format("<%d<", a.co));
            break;
        case Compiler.LACON:
            sb.append(String.format(":%d:", a.co));
            break;
        case '^':
        case '$':
            sb.append(String.format("%c%d", (char)a.type, a.co));
            break;
        case Compiler.EMPTY:
            break;
        default:
            sb.append(String.format("0x%x/0%d", a.type, a.co));
            break;
        }
        if (a.from != s) {
            sb.append(String.format("?%d?", a.from.no));
        }
        sb.append("->");
        if (a.to == null) {
            sb.append("null");
            Arc aa;
            for (aa = a.to.ins; aa != null; aa = aa.inchain) {
                if (aa == a) {
                    break;      /* NOTE BREAK OUT */
                }
            }
            if (aa == null) {
                LOG.debug("?!?");   /* missing from in-chain */
            }
        } else {
            sb.append(String.format("%d", a.to.no));
        }
    }
void dumparc ( Arc a , State s , StringBuilder sb ) { sb . append ( "\t" ) ; switch ( a . type ) { case Compiler . PLAIN : sb . append ( String . format ( "[%d]" , a . co ) ) ; break ; case Compiler . AHEAD : sb . append ( String . format ( ">%d>" , a . co ) ) ; break ; case Compiler . BEHIND : sb . append ( String . format ( "<%d<" , a . co ) ) ; break ; case Compiler . LACON : sb . append ( String . format ( ":%d:" , a . co ) ) ; break ; case ' ' : case ' ' : sb . append ( String . format ( "%c%d" , ( char ) a . type , a . co ) ) ; break ; case Compiler . EMPTY : break ; default : sb . append ( String . format ( "0x%x/0%d" , a . type , a . co ) ) ; break ; } if ( a . from != s ) { sb . append ( String . format ( "?%d?" , a . from . no ) ) ; } sb . append ( "->" ) ; if ( a . to == null ) { sb . append ( "null" ) ; Arc aa ; for ( aa = a . to . ins ; aa != null ; aa = aa . inchain ) { if ( aa == a ) { break ; /* NOTE BREAK OUT */ } } if ( aa == null ) { LOG . debug ( "?!?" ) ; /* missing from in-chain */ } } else { sb . append ( String . format ( "%d" , a . to . no ) ) ; } }
dumparc - dump one outarc in readable form, including prefixing tab
dumparc - dump one outarc in readable form including prefixing tab