I know that designing state machine generators for regular expressions is not trivial, but what about simple strings (when I say a simple string, I mean something like "abcd" -- something without any regular expression syntax). I was thinking of writing a simple string matcher using state machines, but I wanted the state machine to be generated at runtime
The input to the state machine generator is the string to be matched, the output is the state machine. I am not looking for code, but a method/algorithm to do this.
Yes, I could use any of the readily available libraries, but no thanks.