Overview

An arguably simple implementation of regex optimization. It is a sort
of alternative/competitor/Lisp-dual to <https://github.com/jgouly/LLVM-RE>.

Example usage:

REGEX> (defparameter *dfa* (nfa-to-dfa
                            (construct-nfa
                             '((a -> b #\l)
                               (b -> c #\o)
                               (c -> b)
                               (c -> nil #\l)))))
*DFA*
REGEX> (defun test-dfa (dfa str)
         (list
          (dfa-match-string dfa str)
          (funcall (optimized-dfa-matcher (dfa-to-optimized-dfa dfa)) str)))
TEST-DFA
REGEX> (test-dfa *dfa* "lol")
(#<JUST 2> 2)
REGEX> (test-dfa *dfa* "looool")
(#<JUST 5> 5)
REGEX> (test-dfa *dfa* "loooolgarbage")
(#<JUST 5> 5)
REGEX> (test-dfa *dfa* "badmatch")
(#<NOTHING> 0)