From: Tim Vieira Date: Wed, 17 Jul 2013 03:49:50 +0000 (-0400) Subject: anf file required. X-Git-Url: https://hydra-www.ietfng.org/gitweb/?a=commitdiff_plain;h=bc92afa5594ce57a17ea68db14a062207f12c627;p=dyna2 anf file required. --- diff --git a/src/Dyna/Backend/Python/interpreter.py b/src/Dyna/Backend/Python/interpreter.py index b154541..b438f63 100644 --- a/src/Dyna/Backend/Python/interpreter.py +++ b/src/Dyna/Backend/Python/interpreter.py @@ -234,7 +234,8 @@ class Interpreter(object): self.emit(*e) def gbc(self, fn, *args): - # TODO: need to distinguish `unknown` from `null` + # TODO: need to distinguish `unknown` from `null` when we move to mixed + # chaining. head = self.build(fn, *args) @@ -269,10 +270,10 @@ class Interpreter(object): env = imp.load_source('dynamically_loaded_module', filename) anf = {} - if path(filename + '.anf').exists(): # XXX: should have codegen provide this in plan.py - with file(filename + '.anf') as f: - for x in read_anf(f.read()): - anf[x.ruleix] = x + assert path(filename + '.anf').exists() # XXX: codegen should put this is plan.py + with file(filename + '.anf') as f: + for x in read_anf(f.read()): + anf[x.ruleix] = x for k,v in [('chart', self.chart), ('build', self.build),