(self, grammar_file=None)
Initializer.

        Takes an optional alternative filename for the pattern grammar.
Initializer.
Initializer .
def __init__(self, grammar_file=None):
        """Initializer.

        Takes an optional alternative filename for the pattern grammar.
        """
        if grammar_file is None:
            self.grammar = pygram.pattern_grammar
            self.syms = pygram.pattern_symbols
        else:
            self.grammar = driver.load_grammar(grammar_file)
            self.syms = pygram.Symbols(self.grammar)
        self.pygrammar = pygram.python_grammar
        self.pysyms = pygram.python_symbols
        self.driver = driver.Driver(self.grammar, convert=pattern_convert)
def __init__ ( self , grammar_file = None ) : if grammar_file is None : self . grammar = pygram . pattern_grammar self . syms = pygram . pattern_symbols else : self . grammar = driver . load_grammar ( grammar_file ) self . syms = pygram . Symbols ( self . grammar ) self . pygrammar = pygram . python_grammar self . pysyms = pygram . python_symbols self . driver = driver . Driver ( self . grammar , convert = pattern_convert )