StateSet initialize ( int start ) { // Discard state sets; reuse would be faster if we kept them, // but then we'd need the real cache. stateSets . clear ( ) ; StateSet stateSet = new StateSet ( nstates , ncolors ) ; stateSet . states . set ( cnfa . pre ) ; stateSet . noprogress = true ; // Insert into hash table based on that one state. stateSets . put ( stateSet . states , stateSet ) ; stateSet . setLastSeen ( start ) ; return stateSet ; }
Called at the start of a match . arguably we could just construct a new DFA each time .