Home | History | Annotate | Download | only in tools

Lines Matching refs:re

83 import re
327 _ALT_TOKEN_REPLACEMENT_PATTERN = re.compile(
346 _MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)'
354 _RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?')
542 # This will always be the fallback because we're not sure
921 _RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
924 _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"')
926 _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'")
928 # This RE is a little bit more complicated than one might expect, because we
931 # The current rule is: We only clear spaces from both sides when we're at the
935 _RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile(
939 /\*.*\*/)""", re.VERBOSE)
1046 We nix strings first so we're not fooled by text like '"http://"'
1137 if re.search(r'Copyright', lines[line], re.I): break
1158 filename = re.sub(r'_flymake\.h$', '.h', filename)
1159 filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
1164 file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root)
1165 return re.sub(r'[-./\s]', '_', file_path_from_root).upper() + '_'
1314 'do well with such strings, and may give bogus warnings. They\'re '
1364 _RE_PATTERN_INVALID_INCREMENT = re.compile(
1501 if not Match((r'};*\s*(//|/\*).*\bnamespace\s+' + re.escape(self.name) +
1880 % re.escape(base_classname),
1884 not Match(r'(const\s+)?%s\s*(?:<\w+>\s*)?&' % re.escape(base_classname),
1919 # a function name (alnum + _) and we're not starting a macro. Also ignore
1920 # pointers and references to arrays and functions coz they're too tricky:
2045 _RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?')
2347 # but some lines are exceptions -- e.g. if they're big
2365 line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line)
2662 # Braces shouldn't be followed by a ; unless they're defining a struct
2939 _RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"')
2940 _RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$')
2946 _RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+')
3028 # If the target file and the include we're checking share a
3151 match = re.search(start_pattern, text, re.M)
3216 # TODO(unknown): figure out if they're using default arguments in fn proto.
3221 # These are complicated re's. They try to capture the following:
3223 # version, we're willing for const to be before typename or after
3226 if (len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) >
3227 len(re.findall(r'\([^()]*\bconst\s+(?:typename\s+)?(?:struct\s+)?'
3229 len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+\s+const(\s?&|&\s?)[\w]+',
3243 # Check to see if they're using an conversion function cast.
3255 # which looks much like the cast we're trying to detect.
3322 # Check that we're not using RTTI outside of testing code.
3401 function_name = re.search(r'\b((?:string)?printf)\s*\(',
3402 line, re.I).group(1)
3426 tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3))
3595 _RE_PATTERN_STRING = re.compile(r'\bstring\b')
3603 (re.compile(r'[^>.]\b' + _template + r'(<.*?>)?\([^\)]'),
3611 (re.compile(r'(\<|\b)' + _template + r'\s*\<'),
3765 abs_filename = re.sub(r'_flymake\.cc$', '.cc', abs_filename)
3777 # know where to look. In that case we'll give up as we're not sure they
3793 _RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<')