Lines Matching refs:match

659   return _regexp_compile_cache[pattern].match(s)
1458 if _RE_PATTERN_INCLUDE.match(elided):
1472 match = Match(r'^([^\'"]*)([\'"])(.*)$', elided)
1473 if not match:
1476 head, quote, tail = match.groups()
1946 match = Match(r'#endif\s*//\s*' + cppvar + r'(_)?\b', endif)
1947 if match:
1948 if match.group(1) == '_':
1965 match = Match(r'#endif\s*/\*\s*' + cppvar + r'(_)?\s*\*/', endif)
1966 if match:
1967 if match.group(1) == '_':
2181 if _RE_PATTERN_INVALID_INCREMENT.match(line):
2300 match = Search(
2304 if match:
2307 match.group(1) + ' should be the last thing in the class')
2481 match = Match(r'^[^{};=\[\]\.<>]*(.)', line[pos:])
2482 if not match:
2486 token = match.group(1)
2487 pos += len(match.group(0))
2612 _MATCH_ASM.match(line)):
2720 if _MATCH_ASM.match(line):
2955 match = Search(pattern, line)
2956 if match:
2957 fncall = match.group(1) # look inside the parens for function calls
3137 match = _RE_PATTERN_TODO.match(comment)
3138 if match:
3140 leading_whitespace = match.group(1)
3145 username = match.group(2)
3151 middle_whitespace = match.group(3)
3312 match = Match(r'^(.*\boperator\b)(\S+)(\s*\(.*)$', line)
3313 if match:
3314 line = match.group(1) + ('_' * len(match.group(2))) + match.group(3)
3346 match = Search(r'[^<>=!\s](==|!=|<=|>=|\|\|)[^<>=!\s,;\)]', line)
3347 if match:
3349 'Missing spaces around %s' % match.group(1))
3355 match = Match(r'^(.*[^\s<])<[^\s=<,]', line)
3356 if match:
3358 clean_lines, linenum, len(match.group(1)))
3366 match = Match(r'^(.*[^-\s>])>[^\s=>,]', line)
3367 if match:
3369 clean_lines, linenum, len(match.group(1)))
3379 match = Search(r'(operator|[^\s(<])(?:L|UL|LL|ULL|l|ul|ll|ull)?<<([^\s,=<])', line)
3380 if (match and not (match.group(1).isdigit() and match.group(2).isdigit()) and
3381 not (match.group(1) == 'operator' and match.group(2) == ';')):
3397 match = Search(r'>>[a-zA-Z_]', line)
3398 if match:
3403 match = Search(r'(!\s|~\s|[\s]--[\s;]|[\s]\+\+[\s;])', line)
3404 if match:
3406 'Extra space for operator %s' % match.group(1))
3421 match = Search(r' (if\(|for\(|while\(|switch\()', line)
3422 if match:
3424 'Missing space before ( in %s' % match.group(1))
3431 match = Search(r'\b(if|for|while|switch)\s*'
3434 if match:
3435 if len(match.group(2)) != len(match.group(4)):
3436 if not (match.group(3) == ';' and
3437 len(match.group(2)) == 1 + len(match.group(4)) or
3438 not match.group(2) and Search(r'\bfor\s*\(.*; \)', line)):
3440 'Mismatching spaces inside () in %s' % match.group(1))
3441 if len(match.group(2)) not in [0, 1]:
3444 match.group(1))
3502 if _TYPES.match(token):
3565 match = Match(r'^(.*[^ ({>]){', line)
3567 if match:
3596 leading_text = match.group(1)
3598 clean_lines, linenum, len(match.group(1)))
3906 match = Match(r'^(.*\)\s*)\{', line)
3907 if match:
3934 closing_brace_pos = match.group(1).rfind(')')
3950 match = None
3951 if (match and
3955 match = None
3959 match = Match(r'^(.*(?:else|\)\s*const)\s*)\{', line)
3960 if not match:
3971 match = Match(r'^(\s*)\{', line)
3974 if match:
3976 clean_lines, linenum, len(match.group(1)))
4268 for match in _ALT_TOKEN_REPLACEMENT_PATTERN.finditer(line):
4271 _ALT_TOKEN_REPLACEMENT[match.group(1)], match.group(1)))
4500 target_first_component = _RE_FIRST_COMPONENT.match(target_base)
4501 include_first_component = _RE_FIRST_COMPONENT.match(include_base)
4535 match = Match(r'#include\s*"([^/]+\.h)"', line)
4536 if match and not _THIRD_PARTY_HEADERS_PATTERN.match(match.group(1)):
4543 match = _RE_PATTERN_INCLUDE.search(line)
4544 if match:
4545 include = match.group(2)
4546 is_system = (match.group(1) == '<')
4556 elif not _THIRD_PARTY_HEADERS_PATTERN.match(include):
4613 match = re.search(start_pattern, text, re.M)
4614 if not match: # start_pattern not found in text.
4616 start_position = match.end(0)
4693 match = _RE_PATTERN_INCLUDE.search(line)
4694 if match:
4700 match = Match(r'^\s*#\s*(if|ifdef|ifndef|elif|else|endif)\b', line)
4701 if match:
4702 include_state.ResetSection(match.group(1))
4727 match = Search(r'\b(short|long(?! +double)|long long)\b', line)
4728 if match:
4730 'Use int16/int64/etc, rather than the C type %s' % match.group(1))
4757 match = Match(r'([\w.\->()]+)$', printf_args)
4758 if match and match.group(1) != '__VA_ARGS__':
4763 % (function_name, match.group(1)))
4766 match = Search(r'memset\s*\(([^,]*),\s*([^,]*),\s*0\s*\)', line)
4767 if match and not Match(r"^''|-?[0-9]+|0x[0-9A-Fa-f]$", match.group(2)):
4770 % (match.group(1), match.group(2)))
4778 match = Match(r'\s*(.+::)?(\w+) [a-z]\w*\[(.+)];', line)
4779 if (match and match.group(2) != 'return' and match.group(2) != 'delete' and
4780 match.group(3).find(']') == -1):
4784 tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3))
4849 match = Match(
4870 if (match and
4873 not Match(r'\s*(<.*>)?(::[a-zA-Z0-9_]+)*\s*\(([^"]|$)', match.group(4))):
4878 (match.group(1), match.group(2) or '', match.group(3)))
4901 match = Search(r'snprintf\s*\(([^,]*),\s*([0-9]*)\s*,', line)
4902 if match and match.group(2) != '0':
4906 'to snprintf.' % (match.group(1), match.group(2)))
4912 match = Search(r'\b(strcpy|strcat)\s*\(', line)
4913 if match:
4915 'Almost always, snprintf is better than %s' % match.group(1))
4930 match = Match(r'^([^()]*\w+)\(', clean_lines.elided[i])
4931 if match:
4934 clean_lines, i, len(match.group(1)))
5152 match = Search(
5157 if match and not expecting_function:
5158 matched_type = match.group(2)
5172 matched_new_or_template = match.group(1)
5176 if Match(r'\([^()]+\)\s*\[', match.group(3)):
5184 matched_funcptr = match.group(3)
5224 match = Search(
5227 if match:
5232 match = Match(r'^(.*&(?:static|dynamic|down|reinterpret)_cast\b)<', line)
5233 if match:
5234 _, y1, x1 = CloseExpression(clean_lines, linenum, len(match.group(1)))
5273 match = Search(pattern, line)
5274 if not match:
5278 context = line[0:match.start(1) - 1]
5296 remainder = line[match.end(0):]
5304 (cast_type, match.group(1)))
5476 match = _RE_PATTERN_INCLUDE.search(clean_line)
5477 if match:
5478 include = match.group(2)
5598 match = _RE_PATTERN_EXPLICIT_MAKEPAIR.search(line)
5599 if match:
5657 match = Search(r'\b(override|final)\b', line)
5658 if match:
5661 'already declared as "%s"' % match.group(1)))
5977 if pattern.match(base_name):