#!/usr/bin/env python
"""
:Author Patrik Valkovic
:Created 01.08.2017 07:33
:Licence GNUv3
Part of grammpy

"""

from .MultipleRulesGrammar import MultipleRulesGrammar as Grammar


class PrettyApiGrammar(Grammar):
    def __init__(self,
                 terminals=None,
                 nonterminals=None,
                 rules=None,
                 start_symbol=None):
        if isinstance(terminals, str):
            temp = []
            for ch in terminals:
                temp.append(ch)
            terminals = temp
        super().__init__(terminals=terminals,
                         nonterminals=nonterminals,
                         rules=rules,
                         start_symbol=start_symbol)

@@ -708,8 +708,280 @@
 symbol)%0A
+    def __copy__(self):%0A        return PrettyApiGrammar(terminals=(t.s for t in self.terms()),%0A                                nonterminals=self.nonterms(),%0A                                rules=self.rules(),%0A                                start_symbol=self.start_get())%0A

Add __copy__ method to grammar