|
@@ -131,23 +131,38 @@ Action function construct_unknown():
|
|
|
return construct_break()
|
|
|
elif (elem == "continue"):
|
|
|
return construct_continue()
|
|
|
- elif (elem == "instantiate_bottom"):
|
|
|
- new_model = create_node()
|
|
|
- dict_add(new_model, "model", create_node())
|
|
|
- instantiate_bottom(new_model)
|
|
|
- output(new_model)
|
|
|
- return construct_unknown()
|
|
|
- elif (elem == "instantiate_model"):
|
|
|
- new_model = instantiate_new_model(input(), dict_read(dict_read(input(), "model"), input()))
|
|
|
- instantiate_model(new_model)
|
|
|
- output(new_model)
|
|
|
- return construct_unknown()
|
|
|
- elif (elem == "retype_model"):
|
|
|
- retype_model(input())
|
|
|
- return construct_unknown()
|
|
|
+ elif (elem == "model"):
|
|
|
+ return construct_model()
|
|
|
else:
|
|
|
log("ERROR: did not understand command " + cast_e2s(elem))
|
|
|
|
|
|
+Void function construct_model():
|
|
|
+ String command
|
|
|
+ while(True):
|
|
|
+ command = input()
|
|
|
+ if (command == "instantiate_model"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "instantiate_bottom"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "add_node"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "add_edge"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "add_value"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "add_element"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "add_attribute"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "add_link"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "retype"):
|
|
|
+ // TODO
|
|
|
+ elif (command == "code"):
|
|
|
+ return construct_unknown()
|
|
|
+ else:
|
|
|
+ log("Model command not understood: " + command)
|
|
|
+
|
|
|
Action function construct_if():
|
|
|
Action this_element
|
|
|
this_element = create_value(!if)
|
|
@@ -413,3 +428,4 @@ Element function find_attribute(source : Element, attr_name : String, types : El
|
|
|
i = i + 1
|
|
|
// No return at the moment, as this crashes the MvK
|
|
|
log("ERROR: could not find attribute")
|
|
|
+
|