Refactor lexer.rb to use mostly strings.