void markcanreach ( State s , State okay , State mark ) { Arc a ; if ( s . tmp != okay ) { return ; } s . tmp = mark ; for ( a = s . ins ; a != null ; a = a . inchain ) { markcanreach ( a . from , okay , mark ) ; } }
markcanreach - recursive marking of states which can reach here