Update lympha

parent 4043d57c
......@@ -269,7 +269,7 @@ def mapfunc():
#For nonbinar-evaluations
# elif object_list[key].operator1 != "":
elif object_list[key].datatype == "nonbineval" :
if object_list[key].datatype == "nonbineval" :
#endstringLIST = re.findall("(?<=>=).*$|(?<=<=).*$|(?<=<).*$|(?<=>).*$|(?<===).*$", object_list[key].statement_value)
#endstring=("%s"%str(endstringLIST))
......@@ -280,7 +280,7 @@ def mapfunc():
#comp = re.compile(r'(\d*)', re.IGNORECASE)
endstring = str()
string = (object_list[key].statement_value.replace(" ",""))
pattern = re.compile(r'(\w*\?)')
pattern = re.compile(r'(\w*\?)|(.*)')
#pattern = re.compile(r'\d*|\w*|\+|\-|\/|\*|\(|\)')
iteratorUntouched = pattern.split(string)
iteratorTouched = pattern.split(string)
......@@ -329,13 +329,15 @@ def mapfunc():
pre_statement_flow = 1
else:
pre_statement_flow = 0
object_list[key].statement_flow = int(pre_statement_flow)
object_list[key].statement_flow = int(pre_statement_flow)
print ("VALUE 2 %s" % object_list[key].statement_value)
#For equations
elif object_list[key].datatype == "valu":
if object_list[key].datatype == "valu":
#if object_list[key].statement_value != "" and object_list[key].operator1 == "" :
endstring = str()
print("VALUE 3: %s" % object_list[key].statement_value)
string = (object_list[key].statement_value.replace(" ",""))
pattern = re.compile(r'(\d*)(\w*\?)')
#pattern = re.compile(r'\d*|\w*|\+|\-|\/|\*|\(|\)')
......@@ -557,10 +559,8 @@ def lexer():
side1 = side1.replace(" ","")
side2 = side2.replace(" ","")
for key in range(0,len(object_list)) :
#if (" %s" % serie) == sides[0] or (" %s" % serie) == sides[0] or ("%s" % serie) == sides[0] :
#if re.compile(rf"\s+{serie}\s+").match(sides[0]) :
#if not re.compile('^\s*$').match(serie)
#side1 = side1.replace(" ","")
thename = object_list[key].name
if ("%s" % thename.replace(" ", "")) == sides[0].replace(" ", "") :
#For binary values
if str("1B") in str(sides[1]) :
......@@ -624,15 +624,16 @@ def lexer():
elif bin_chopped == 0 :
object_list[key].statement_value = operator_chop[2]
object_list[key].datatype = "nonbineval"
print ("S. VALUE: %s" % object_list[key].statement_value)
#For non-binary values and equations
elif sides[0] != "" and sides[1] != "" :
print("YYY")
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:
......
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