src/HOL/Lex/README.html
author wenzelm
Thu, 26 Jun 1997 11:14:46 +0200
changeset 3462 3472fa00b1d4
parent 3279 815ef5848324
child 4137 2ce2e659c2b1
permissions -rw-r--r--
rearrange pages of ps file to be printed as booklet (duplex);

<HTML><HEAD><TITLE>HOL/Lex/README</TITLE></HEAD>
<BODY>

<H1>A Simplified Scanner Generator</H1>

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

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.  <P>

</BODY>
</HTML>