def METHOD_NAME(self):
    """
    Copy the grammar.
    """
    new = self.__class__()
    for dict_attr in ("symbol2number", "number2symbol", "dfas", "keywords",
                      "tokens", "symbol2label"):
        setattr(new, dict_attr, getattr(self, dict_attr).METHOD_NAME())
    new.labels = self.labels[:]
    new.states = self.states[:]
    new.start = self.start
    return new