|
@@ -1,5 +1,6 @@
|
|
|
from visitor import Visitor
|
|
|
from compiler import main as do_compile
|
|
|
+import os
|
|
|
|
|
|
def jsonstr(s):
|
|
|
return '"%s"' % s
|
|
@@ -104,4 +105,5 @@ class ModelVisitor(Visitor):
|
|
|
with open(".constraint.alc", 'w') as f:
|
|
|
f.write(constraint)
|
|
|
f.flush()
|
|
|
- self.constructors.extend(['"add_constraint"', jsonstr(self.current_model), jsonstr(self.current_element)] + do_compile(".constraint.alc", "interface/HUTN/grammars/actionlanguage.g", "CS"))
|
|
|
+ directory = os.path.realpath(__file__).rsplit(os.sep, 1)[0]
|
|
|
+ self.constructors.extend(['"add_constraint"', jsonstr(self.current_model), jsonstr(self.current_element)] + do_compile(".constraint.alc", directory + "/../grammars/actionlanguage.g", "CS"))
|