Separated lexer from parser, added test for lexer