very rough initial draft of lexer code

Given a list of regular expressions, tokenizing (lexing) a stream of
characters is accomplished by repeatedly calling match. The most
important thing missing is the production of an instance of the token
type for each match, rather than just the matching string itself.