Переглянути джерело

Add tiny link between PN interface and compilation manager

Yentl Van Tendeloo 9 роки тому
батько
коміт
ad0074c6d2

+ 3 - 2
bootstrap/compilation_manager.alc

@@ -2,7 +2,7 @@ include "primitives.alh"
 include "constructors.alh"
 include "conformance_scd.alh"
 
-Element function compilation_manager():
+Void function compilation_manager():
 	String operation
 	String object_name
 	Element root
@@ -60,7 +60,8 @@ Element function compilation_manager():
 			output(create_node())
 	else:
 		log("Failed to understand command")
-	return operation
+
+	return
 
 String function check_symbols(root : Element, main_function : String, objs : Element):
 	Element symbols

+ 5 - 0
integration/code/pn_interface.alc

@@ -6,6 +6,7 @@ include "conformance_scd.alh"
 include "io.alh"
 include "metamodels.alh"
 include "modelling.alh"
+include "compilation_manager.alh"
 
 Element function pn_operations():
 	Element ops
@@ -456,6 +457,10 @@ Element function initial_prompt():
 					output("Rename complete!")
 			else:
 				output("Model not found; aborting")
+		elif (command == "actions"):
+			output("Switching to compilation manager!")
+			compilation_manager()
+			output("Back in model manager!")
 		else:
 			output("Command not recognized, use 'help' for a list of possible commands")
 

+ 1 - 0
interface/HUTN/includes/compilation_manager.alh

@@ -0,0 +1 @@
+Void function compilation_manager()

+ 3 - 3
scripts/prompt.py

@@ -93,11 +93,11 @@ while 1:
 
     if command.startswith("$"):
         # Invoke the HUTN parser
-        tmp_file = "__constraint.al"
+        tmp_file = "__action.alc"
         with open(tmp_file, 'w') as f:
-            f.write("Element function constraint(model : Element, element_name : String):\n")
+            f.write("")
         local_print("Entering HUTN coding environment.")
-        local_print("There is no nice editor right now, so please just modify the file '__constraint.al' in this folder.")
+        local_print("There is no nice editor right now, so please just modify the file '__action.alc' in this folder.")
         while 1:
             local_print("When you are done, press <return> to continue.")
             raw_input()