
from grammpy import Grammar
from .NongeneratingSymbolsRemove import remove_nongenerating_symbols


class ContextFree():
    @staticmethod
    def remove_nongenerating_symbols(grammar: Grammar, transform_grammar=False):
        return remove_nongenerating_symbols(grammar, transform_grammar)

    @staticmethod
    def is_grammar_generating(grammar: Grammar):
        g = ContextFree.remove_nongenerating_symbols(grammar)
        return g.start_get() in g.nonterms()


from grammpy import Grammar
from .NongeneratingSymbolsRemove import remove_nongenerating_symbols


class ContextFree:
    @staticmethod
    def remove_nongenerating_symbols(grammar: Grammar, transform_grammar=False):
        return remove_nongenerating_symbols(grammar, transform_grammar)

    @staticmethod
    def is_grammar_generating(grammar: Grammar, tranform_gramar=False, perform_remove=True):
        g = grammar
        if perform_remove:
            g = ContextFree.remove_nongenerating_symbols(grammar, transform_grammar=tranform_gramar)
        return g.start_get() in g.nonterms()

Add additional parameters into CotextFree.is_grammar_generating method
Add additional parameters into CotextFree.is_grammar_generating method

  
  from grammpy import Grammar
  from .NongeneratingSymbolsRemove import remove_nongenerating_symbols
  
  
- class ContextFree():
+ class ContextFree:
      @staticmethod
      def remove_nongenerating_symbols(grammar: Grammar, transform_grammar=False):
          return remove_nongenerating_symbols(grammar, transform_grammar)
  
      @staticmethod
-     def is_grammar_generating(grammar: Grammar):
+     def is_grammar_generating(grammar: Grammar, tranform_gramar=False, perform_remove=True):
+         g = grammar
+         if perform_remove:
-         g = ContextFree.remove_nongenerating_symbols(grammar)
+             g = ContextFree.remove_nongenerating_symbols(grammar, transform_grammar=tranform_gramar)
          return g.start_get() in g.nonterms()
  
Add additional parameters into CotextFree.is_grammar_generating method
## Code Before:

from grammpy import Grammar
from .NongeneratingSymbolsRemove import remove_nongenerating_symbols


class ContextFree():
    @staticmethod
    def remove_nongenerating_symbols(grammar: Grammar, transform_grammar=False):
        return remove_nongenerating_symbols(grammar, transform_grammar)

    @staticmethod
    def is_grammar_generating(grammar: Grammar):
        g = ContextFree.remove_nongenerating_symbols(grammar)
        return g.start_get() in g.nonterms()

## Instruction:
Add additional parameters into CotextFree.is_grammar_generating method
## Code After:

from grammpy import Grammar
from .NongeneratingSymbolsRemove import remove_nongenerating_symbols


class ContextFree:
    @staticmethod
    def remove_nongenerating_symbols(grammar: Grammar, transform_grammar=False):
        return remove_nongenerating_symbols(grammar, transform_grammar)

    @staticmethod
    def is_grammar_generating(grammar: Grammar, tranform_gramar=False, perform_remove=True):
        g = grammar
        if perform_remove:
            g = ContextFree.remove_nongenerating_symbols(grammar, transform_grammar=tranform_gramar)
        return g.start_get() in g.nonterms()
