Pure python lexer and parser implementation.