Update lympha.py

parent e647642b
......@@ -90,30 +90,6 @@ CLIcom_segment = 0
from ast import NodeVisitor
class Evaluator(NodeVisitor):
def __init__(self, **kwargs):
self._namespace = kwargs
def visit_Name(self, node):
return self._namespace[node.id]
def visit_Num(self, node):
return node.n
def visit_NameConstant(self, node):
return node.value
def visit_UnaryOp(self, node):
val = self.visit(node.operand)
return operators[type(node.op)](val)
def visit_BinOp(self, node):
lhs = self.visit(node.left)
rhs = self.visit(node.right)
return operators[type(node.op)](lhs, rhs)
def generic_visit(self, node):
raise ValueError("malformed node or string: " + repr(node))
#Construction of the section model of the linked list.
class Statement(dict):
MARKER = object()
......@@ -497,10 +473,10 @@ def mapfunc():
del CLI_filename, argv_len, filename, filenames, starts, steps, mode_graph, mode_state, filecheck, mode_exe, mode_show, mode_map, exe_list, show_list, map_list, substates, nextstates, specs, global_relative_variable1, global_relative_variable2, operator1, statement_flow, statement_value, exe_objects, object_list,
def statefunc():
global object_list
for key, obj in object_list.items():
print("%s" % object_list[key].name)
#def statefunc():
# global object_list
# for key, obj in object_list.items():
# print("%s" % object_list[key].name)
def stripComments(code):
code = str(code)
......@@ -679,13 +655,10 @@ def lexer():
#For non-binary values and equations
elif sides[0] != "" and sides[1] != "" :
print("YYY %s" % object_list[key].name)
#if 0 == len(operator_chop) :
object_list[key].statement_value = sides[1]
object_list[key].datatype = "valu"
print("DATA TYPE: %s" % object_list[key].datatype)
print("ZZZ")
#if CLIcom_segment == 1:
#CLIcom_segment = 2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment