1. 14

  2. 2

    How does this not have a link to the library?

    1. 2

      It’s not yet released as a library, but check out the code on the linked slides.

    2. [Comment removed by author]

      1. 2

        I don’t know if it was particularly fast (I doubt it), and it wasn’t intended as general purpose regex engine, but a few years ago I made a basic regex -> NFA -> DFA library. I was mainly doing it to teach myself Haskell and refresh on automata theory, so it’s probably not the greatest code, but still may be relevant.


        There’s a slightly more full featured Python version in the same repo, up a directory.

        1. 2

          To add to this: The problem with the classical approach is that DFA’s can become exponentially large. Most general purpose regex engines I know eschew the classical approach for that reason. GNU grep, for example, builds the DFA lazily.