Improve `get_value_from_output` of tool module ABC
Match arbitrary white space after the identifier
Match either "=" or ":"
Match arbitrary white space after "=" or ":"
Match postive or negative numbers (integer, decimal, or scientific notation)
@@ -35,13 +35,13 @@ class Tool(benchexec.tools.template.BaseTool2):
regex_scinote = r"(\d\.?\d*[Ee][+\-]?\d+)"
regex_pattern = (
re.escape(identifier)
- + r"\s*("
+ + r"\s*[:=]\s*(-?("
+ regex_integer
+ r"|"
+ regex_decimal
+ r"|"
+ regex_scinote
- + r")(\s|$)"
+ + r"))(\s|$)"
)
regex = re.compile(regex_pattern)
match = None
