Lines Matching defs:match
25 # to match in the compiler-generated output.
30 # name must exactly match one of the groups recognized in the output (they can
35 # - CHECK: Must match an output line which appears in the output group
37 # lines must therefore match the check lines in the same order.
39 # - CHECK-DAG: Must match an output line which appears in the output group
43 # - CHECK-NOT: Must not match any output line which appears in the output group
55 # the invalid regex 'foo{2', but '{{(fo{2})}}' will match 'foo'.
69 # The engine will attempt to match the check lines against the output of the
243 # Returns True if the given Match object was at the beginning of the line.
244 def __isMatchAtStart(self, match):
245 return (match is not None) and (match.start() == 0)
247 # Takes in a list of Match objects and returns the minimal start point among
282 # text match all the way until the first special marker (or the end
307 # Attempts to match the check line against a line from the output file with
310 def match(self, outputLine, initialVarState):
326 # Find the earliest match for this line part.
329 match = re.search(pattern, outputLine[matchStart:])
330 if (match is None) or (not isAfterSeparator and not self.__isMatchAtStart(match)):
332 matchEnd = matchStart + match.end()
333 matchStart += match.start()
335 # Check if this is a valid match if we expect a whitespace separator
336 # before the matched text. Otherwise loop and look for another match.
388 # other's match location, i.e. either consecutive DAG lines or a single
411 newVarState = checkLine.match(outputLine, varState)
437 Logger.testFailed("Could not match check line \"" + checkLine.content + "\" " +
443 # match locations of this independent group.
450 # Makes sure that the given check lines do not match any of the given output
464 def match(self, outputGroup):
474 # Match the independent checks.
558 # The 'match' function succeeds only if the pattern is matched at the
560 match = re.match(regexPrefix, line)
561 if match is not None:
562 return line[match.end():].strip()
603 def match(self, outputFile):
607 # match a check group against the first output group of the same name.
613 checkGroup.match(outputGroup)
648 if re.match("name\s+\"[^\"]+\"", line):
665 if re.match("method\s+\"[^\"]*\"", line):
763 checkFile.match(outputFile)