|
|
|
|
|
by fmap
2670 days ago
|
|
Derivatives are simple to explain, but not entirely straightforward to implement efficiently. I personally prefer the Glushkov construction. The Glushkov construction (which Hyperscan uses among other things) is a similarly straightforward translation from a regular expression to an epsilon-free NFA with nice properties. There's a very neat paper explaining the construction in the form of a play: https://sebfisch.github.io/haskell-regexp/regexp-play.pdf On the CFG side, I like to think of Early parsing as analogous to the Glushkov construction. At the very least they have similar properties. |
|