|
|
@ -989,7 +989,7 @@ func thompson(re []postfixNode) (Reg, error) {
|
|
|
|
return &s
|
|
|
|
return &s
|
|
|
|
})
|
|
|
|
})
|
|
|
|
// Reduce the list of states down to a single state by alternating them
|
|
|
|
// Reduce the list of states down to a single state by alternating them
|
|
|
|
toAdd := Reduce(states, func(s1 *State, s2 *State) *State {
|
|
|
|
toAdd := funcReduce(states, func(s1 *State, s2 *State) *State {
|
|
|
|
return alternate(s1, s2)
|
|
|
|
return alternate(s1, s2)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
nfa = append(nfa, toAdd)
|
|
|
|
nfa = append(nfa, toAdd)
|
|
|
|