A greedy, streaming lexer written in vanilla Javascript