|
@@ -7,7 +7,7 @@ include "modelling.alh"
|
|
Element while_stack = ?
|
|
Element while_stack = ?
|
|
Element variable_map = ?
|
|
Element variable_map = ?
|
|
|
|
|
|
-Action function construct_top():
|
|
|
|
|
|
+Element function construct_top():
|
|
String command
|
|
String command
|
|
while (True):
|
|
while (True):
|
|
command = input()
|
|
command = input()
|
|
@@ -19,6 +19,8 @@ Action function construct_top():
|
|
return construct_top_funcdef(True)!
|
|
return construct_top_funcdef(True)!
|
|
else:
|
|
else:
|
|
log("ERROR (1): did not understand command " + cast_e2s(command))
|
|
log("ERROR (1): did not understand command " + cast_e2s(command))
|
|
|
|
+ output("ERROR: compiled code not understood: " + cast_e2s(command))
|
|
|
|
+ return read_root()!
|
|
|
|
|
|
Action function construct_global():
|
|
Action function construct_global():
|
|
Action this_element
|
|
Action this_element
|
|
@@ -117,7 +119,7 @@ Action function construct_top_funcdef(mutable : Boolean):
|
|
|
|
|
|
return global!
|
|
return global!
|
|
|
|
|
|
-Action function construct_unknown():
|
|
|
|
|
|
+Element function construct_unknown():
|
|
String elem
|
|
String elem
|
|
Element new_model
|
|
Element new_model
|
|
Element new_model_model
|
|
Element new_model_model
|
|
@@ -156,6 +158,8 @@ Action function construct_unknown():
|
|
return construct_unknown()!
|
|
return construct_unknown()!
|
|
else:
|
|
else:
|
|
log("ERROR (2): did not understand command " + cast_e2s(elem))
|
|
log("ERROR (2): did not understand command " + cast_e2s(elem))
|
|
|
|
+ output("ERROR: compiled code not understood: " + cast_e2s(elem))
|
|
|
|
+ return read_root()!
|
|
|
|
|
|
Action function construct_if():
|
|
Action function construct_if():
|
|
Action this_element
|
|
Action this_element
|