Wrote initial lexer

It might be buggy. I had to hack around the fact that the ply lexer is
using the python re module.

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