Translate a lexer file with a format similar to re2c (http://re2c.org) into a PHP 5 lexer for use with a parser.