A Simplified Scanner Generator

This is half of a simplified functional scanner generator. The overall design is like this:
         regular expression
                  |
                  v
             -----------
             | mk_auto |
             -----------
                  |
        deterministic automaton
                  |
                  v
           ----------------
string --> | auto_chopper | --> chopped up string
           ----------------
A chopped up string is a pair of For example, if the language consists just of the word ab, the input ababaab is partitioned into a chopped up prefix [ab,ab] and the suffix aab.

The auto_chopper is implemented in theory AutoChopper. The top part of the diagram, i.e. the translation of regular expressions into deterministic finite automata is still missing.