Porting Matt Might's McLexer lexical analyzer to Python