Exemple #1
0
 def get_symbol(self, name):
     try:
         symbols_for_name = self.symbols[name]
         assert len(symbols_for_name) == 1
         return symbols_for_name[0]
     except KeyError:
         raise UndefinedSymbolError(name)
Exemple #2
0
 def get_symbol(self, name):
     try:
         return self.symbols[name]
     except KeyError:
         raise UndefinedSymbolError(name)
Exemple #3
0
 def __init__(self, name, env):
     GrammarSymbol.__init__(self)
     self.value = env.formula_manager.get_symbol(name)
     if self.value is None:
         raise UndefinedSymbolError(name)