Lifetime rules make thebuffer.clear()calls inread_dfa()awkward. Would make more sense to put them at the end of using the buffer value, but that would require another scope Lifetimes in same line are too restrictive (see comments)
Introduction: The problem of finding the minimal DFA equivalent to a given automaton can be traced back to the 1950s with the works of Huffman (1954, 1955) and Moore (1956). Having applications on compiler construction, pattern matching, hardware circuit minimization, and XML processing to name...