[chapter 2] Get started on the lexer

Also added tests.