Write out identical lexer actions only once

*thanks to the BDFL I hat to import functools, I really like
 reduce (and used it rightfully)
*thanks to the BDFL there is python and the operator module
 making the reduce call easier

So, all in all, I am content.