Home | History | Annotate | Download | only in scripts

Lines Matching refs:re

83 import re
323 _ALT_TOKEN_REPLACEMENT_PATTERN = re.compile(
342 _MATCH_ASM = re.compile(r'^\s*(?:asm|_asm|__asm|__asm__)'
350 _RE_SUPPRESSION = re.compile(r'\bNOLINT\b(\([^)]*\))?')
538 # This will always be the fallback because we're not sure
888 _RE_PATTERN_CLEANSE_LINE_ESCAPES = re.compile(
891 _RE_PATTERN_CLEANSE_LINE_DOUBLE_QUOTES = re.compile(r'"[^"]*"')
893 _RE_PATTERN_CLEANSE_LINE_SINGLE_QUOTES = re.compile(r"'.'")
895 # This RE is a little bit more complicated than one might expect, because we
898 # The current rule is: We only clear spaces from both sides when we're at the
902 _RE_PATTERN_CLEANSE_LINE_C_COMMENTS = re.compile(
906 /\*.*\*/)""", re.VERBOSE)
1013 We nix strings first so we're not fooled by text like '"http://"'
1104 if re.search(r'Copyright', lines[line], re.I): break
1125 filename = re.sub(r'_flymake\.h$', '.h', filename)
1126 filename = re.sub(r'/\.flymake/([^/]*)$', r'/\1', filename)
1131 file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root)
1132 return re.sub(r'[-./\s]', '_', file_path_from_root).upper() + '_'
1281 'do well with such strings, and may give bogus warnings. They\'re '
1331 _RE_PATTERN_INVALID_INCREMENT = re.compile(
1468 if not Match((r'};*\s*(//|/\*).*\bnamespace\s+' + re.escape(self.name) +
1847 % re.escape(base_classname),
1851 not Match(r'(const\s+)?%s\s*(?:<\w+>\s*)?&' % re.escape(base_classname),
1886 # a function name (alnum + _) and we're not starting a macro. Also ignore
1887 # pointers and references to arrays and functions coz they're too tricky:
2009 _RE_PATTERN_TODO = re.compile(r'^//(\s*)TODO(\(.+?\))?:?(\s|$)?')
2311 # but some lines are exceptions -- e.g. if they're big
2329 line = re.sub(r'operator(==|!=|<|<<|<=|>=|>>|>)\(', 'operator\(', line)
2626 # Braces shouldn't be followed by a ; unless they're defining a struct
2903 _RE_PATTERN_INCLUDE_NEW_STYLE = re.compile(r'#include +"[^/]+\.h"')
2904 _RE_PATTERN_INCLUDE = re.compile(r'^\s*#\s*include\s*([<"])([^>"]*)[>"].*$')
2910 _RE_FIRST_COMPONENT = re.compile(r'^[^-_.]+')
2992 # If the target file and the include we're checking share a
3115 match = re.search(start_pattern, text, re.M)
3180 # TODO(unknown): figure out if they're using default arguments in fn proto.
3185 # These are complicated re's. They try to capture the following:
3187 # version, we're willing for const to be before typename or after
3190 if (len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+(\s?&|&\s?)\w+', fnline)) >
3191 len(re.findall(r'\([^()]*\bconst\s+(?:typename\s+)?(?:struct\s+)?'
3193 len(re.findall(r'\([^()]*\b(?:[\w:]|<[^()]*>)+\s+const(\s?&|&\s?)[\w]+',
3207 # Check to see if they're using an conversion function cast.
3219 # which looks much like the cast we're trying to detect.
3279 # Check that we're not using RTTI outside of testing code.
3358 function_name = re.search(r'\b((?:string)?printf)\s*\(',
3359 line, re.I).group(1)
3383 tokens = re.split(r'\s|\+|\-|\*|\/|<<|>>]', match.group(3))
3552 _RE_PATTERN_STRING = re.compile(r'\bstring\b')
3560 (re.compile(r'[^>.]\b' + _template + r'(<.*?>)?\([^\)]'),
3568 (re.compile(r'(\<|\b)' + _template + r'\s*\<'),
3722 abs_filename = re.sub(r'_flymake\.cc$', '.cc', abs_filename)
3734 # know where to look. In that case we'll give up as we're not sure they
3750 _RE_PATTERN_EXPLICIT_MAKEPAIR = re.compile(r'\bmake_pair\s*<')