Lines Matching defs:grammar
18 from .pgen2 import driver, literals, token, tokenize, parse, grammar
24 # The pattern grammar file
48 Takes an optional alternative filename for the pattern grammar.
50 self.grammar = driver.load_grammar(grammar_file)
51 self.syms = pygram.Symbols(self.grammar)
54 self.driver = driver.Driver(self.grammar, convert=pattern_convert)
189 elif value in grammar.opmap:
190 return grammar.opmap[value]
195 def pattern_convert(grammar, raw_node_info):
198 if children or type in grammar.number2symbol: