shoebot/kgp.py
def loadGrammar(self, grammar, searchpaths=None):
        """load context-free grammar"""
        self.grammar = self._load(grammar, searchpaths=searchpaths)
        self.refs = {}
        for ref in self.grammar.getElementsByTagName("ref"):
            self.refs[ref.attributes["id"].value] = ref
def loadGrammar(self, grammar, searchpaths=None):
        """load context-free grammar"""
        self.grammar = self._load(grammar, searchpaths=searchpaths)
        self.refs = {}
        for ref in self.grammar.getElementsByTagName("ref"):
            self.refs[ref.attributes["id"].value] = ref
def loadGrammar ( self , grammar , searchpaths = None ) : self . grammar = self . _load ( grammar , searchpaths = searchpaths ) self . refs = { } for ref in self . grammar . getElementsByTagName ( "ref" ) : self . refs [ ref . attributes [ "id" ] . value ] = ref
load context-free grammar
load context - free grammar