Re:More challenging projects every programmer should try
by KMag on Sunday December 20, 2020 @09:54PM
(#25491719)
Have a look at RE2 and Russ Cox's paper [0]. I found it particularly elegant the use of a small LRU cache to effectively lazily convert portions of the NFA to a DFA. A fast regex engine is pretty easy to implement, as long as you don't need extensions, particularly backreferences.
[0] https://swtch.com/~rsc/regexp/regexp1.html