TextGrammarFigure is renamed to TextGrammarFigureGenerator, refactored, and modified to support abstract generator, html generation added