Python metaclass and ModGrammar
Refer https://stackoverflow.com/questions/7064925/python-metaclass-and-modgrammar