&gt; Addendum: And it is also a bad idea to convert am NFA to an DFA for parsing because the number of necessary states can explode exponentially by this transformation.<p>You can skirt this problem using a lazy DFA with a bounded cache. (i.e., See the third article in Cox&#x27;s series.)