Created a function to return a state that will always have a zero-length state

master
Aadhavan Srinivasan 1 week ago
parent 08e01a1c81
commit a259f0ceab

@ -333,3 +333,12 @@ func newState() State {
ret.output = append(ret.output, &ret)
return ret
}
// Creates and returns a state that _always_ has a zero-length match.
func zeroLengthMatchState() State {
start := newState()
start.content = newContents(EPSILON)
start.isEmpty = true
start.assert = ALWAYS_TRUE
return start
}

Loading…
Cancel
Save