Lines Matching +defs:string +defs:match
72 """Augment a Regex object with a flag indicating whether a match should be
202 help="List of regular expressions that a global value declaration must match to generate a check (has no effect if checking globals is not enabled)",
411 m = CHECK_RE.match(input_line)
413 if skip_same_checks and CHECK_SAME_RE.match(input_line):
441 m = CHECK_RE.match(input_line)
460 m = IR_FUNCTION_LABEL_RE.match(line)
629 raw_lines = [m.group(1) for m in [RUN_LINE_RE.match(l) for l in lines] if m]
717 string,
725 self.scrub = string
738 def drop_arg_names(match):
739 nameless_value = self._ginfo.get_nameless_value_from_match(match)
741 arg_names.add(self._ginfo.get_name_from_match(match))
744 substitute = match.group(2)
745 return match.group(1) + substitute + match.group(match.lastindex)
747 def repl_arg_names(match):
748 nameless_value = self._ginfo.get_nameless_value_from_match(match)
751 and self._ginfo.get_name_from_match(match) in arg_names
753 return match.group(1) + match.group(match.lastindex)
754 return match.group(1) + match.group(2) + match.group(match.lastindex)
845 # func_name_separator is the string that is placed right after function name at the
848 # False, just assume that separator is an empty string.
894 match = re.match(regex, func)
895 if match:
898 for g in match.groups():
906 for match in matches:
909 for g in match.groups():
913 # Substitute function call names that match the regex with the same
969 # This returns the list of those prefixes that failed to match any function,
1066 def get_affixes_from_match(self, match):
1067 prefix = re.match(self.ir_prefix, match.group(2)).group(0)
1068 suffix = re.search(self.ir_suffix + "$", match.group(2)).group(0)
1114 match = f"(?:{nameless_value.ir_prefix}({nameless_value.ir_regexp}){nameless_value.ir_suffix})"
1116 match = "^" + match
1117 matches.append(match)
1150 # The entire match is group 0, the prefix has one group (=1), the entire
1154 def get_match_info(self, match):
1156 Returns (name, nameless_value) for the given match object
1158 if match.re == self._regexp:
1161 match.re == self._unstable_globals_regexp
1164 g = match.group(i + GeneralizerInfo.FIRST_NAMELESS_GROUP_IN_MATCH)
1167 error("Unable to identify the kind of IR value from the match!")
1171 def get_name_from_match(self, match):
1172 return self.get_match_info(match)[0]
1174 def get_nameless_value_from_match(self, match) -> NamelessValue:
1175 return self.get_match_info(match)[1]
1280 return check_prefix and re.match(
1335 # identical. In that case, let's give up and not match anything.
1742 # An IR variable named '%.' matches the FileCheck regex string.
1745 if re.match("^@" + regex + " = ", line):
1999 # incorrectly match on "foo.specialized".
2003 # Removing args_and_sig from the label match line requires
2004 # func_name_separator to be empty. Otherwise, the match will not work.
2166 # Label format is based on IR string.
2270 match = re.match(p, line)
2271 return (match.group(1), re.findall(nv.ir_regexp, match.group(2)))
2377 if re.match("^@" + regex + " = ", line) or re.match(
2431 if not PREFIX_RE.match(prefix):
2536 cmd_m = UTC_ARGS_CMD.match(line)
2587 m = CHECK_RE.match(line)
2612 # tool command args string as their second element. They output