simple lexer with tests