This is a follow-up to https://gist.github.com/pepasflo/89c93ef29447f4e22d0f6fb34a99cea7
The javascript implementation now matches the behavior of the python implementation (it loads the lexing grammar in from a file, and reads input from either stdin or a file).
The lexers now stream the tokens to stdout.