def dump_grammar(self, out=sys.stdout):
        """
        Print grammar rules
        """
        for rule in sorted(self.rule2name.items()):
            out.write("%s\n" % rule2str(rule[0]))
        return