Basic Lexing Framework

Everything seems to work. You create a lexer and scan text with it. It
correctly identifies keywords against identifiers if their patterns are
declared first.

Signed-off-by: Tim Henderson <tim.tadh@gmail.com>