make lexing more flexible and improve standard lexers; also add Parser::trans()