Lexer for Rosetta code (https://rosettacode.org/wiki/Compiler/lexical_analyzer)
The java version is a translation of the python source from Rosetta code, the JavaScript and PHP version are translated from Java
java Lexer infile [>outfile]
node Lexer.js infile [>outfile]
php Lexer.php infile [>outfile]
MIT