#2: Added documentation for _index_idiom(), _required_idiom(), _find_template().
#2: Added all missing docstrings to generator.py.
#2: Fixed sphinx documentation of the generator.