class AggregatorError(Exception):
pass
+
class DynaInitializerException(Exception):
def __init__(self, exception, init):
rule = parse_attrs(init)['rule']
stdout, stderr = p.communicate()
if p.returncode:
assert not stdout.strip(), [stdout, stderr]
+ # hide our temporary file's ugly sha1 file names from users.
+ ugly_file_name = dotdynadir + '[a-z0-9/.]+\.dyna\S*'
+ stderr = re.sub(ugly_file_name, '', stderr)
raise DynaCompilerError(stderr)
-
def lexer(term):
return re.findall('"[^"]*"' # string
'|[a-z][a-zA-Z_0-9]*' # functor
a => 1.
> DynaCompilerError:
Encountered error in input program:
- Conflicting aggregators; rule /home/timv/.dyna/tmp/27792/966093dc38b755a6f17b02774b5c656931163a3a.dyna:5:1-/home/timv/.dyna/tmp/27792/966093dc38b755a6f17b02774b5c656931163a3a.dyna:5:3
+ Conflicting aggregators; rule
uses '|=' for a/0 but I had been lead to expect '+='.
Everything was syntactically valid, but we could not
see it through.