Add an initial lexer + unit tests.

The unit tests pass and the lexer seems to be doing the right thing.