diff --git a/server/app/vfg/parser/Animation_parser.py b/server/app/vfg/parser/Animation_parser.py index 78fc7e9..de50b64 100755 --- a/server/app/vfg/parser/Animation_parser.py +++ b/server/app/vfg/parser/Animation_parser.py @@ -106,10 +106,10 @@ def parse_visual(text_to_parse, result): # Get the value of properties temp_property_block = temp_visual_block[temp_visual_block.index(pattern_properties) + len(pattern_properties):] temp_property_block = Parser_Functions.get_one_block(temp_property_block) - temp_properties_pattern = re.compile("\([a-zA-Z0-9_.-]*\s[#a-zA-Z0-9_.-]*\)") + temp_properties_pattern = re.compile(r"\([a-zA-Z0-9_.-]*\s+[#a-zA-Z0-9_.-]+\)") temp_properties = temp_properties_pattern.findall(temp_property_block) for x in temp_properties: - x, y = x.replace('(', '').replace(')', '').split() + x, y = x.replace('(', '').replace(')', '').split() sublist[x] = y result["visual"][temp_subshape_value] = sublist return result; @@ -163,7 +163,7 @@ def parse_predicate(text_to_parse, result): # Get the value of parameters temp_regex_pattern = re.compile(pattern_parameters + " " + "\((.*?)\)", re.IGNORECASE) - objectList = temp_regex_pattern.findall(temp_visual_block)[0].split() + objectList = [t for t in temp_regex_pattern.findall(temp_visual_block)[0].split() if t.startswith('?')] customObjectList = parseObjectLine(pattern_custom, temp_visual_block) # Get the value of effect