A simple lexer for javascript