4 ms·
Regular-expression derivatives reexamined
- gnosis 17y agoI wonder how many of the HN members who vote up highly technical articles like this actually read them.
- jules 17y agoThe real hackers perhaps ;) I think there are many computer science students on HN. They have been taught the standard but complicated Regex -> NFA -> DFA -> Minimal DFA construction in school. Generating almost optimal DFA's directly from regex by simple pattern matching on the structure of the regex may appeal to these students. Anyway, I personally get much more out of technical articles than "fluff" philosophizing articles.
- fadmmatt 17y agoHere's a short implementation (with explanation) in Scheme: http://matt.might.net/articles/implementation-of-regular-expression-matching-in-scheme-with-derivatives/ http://matt.might.net/articles/implementation-of-regular-exp...