Lines Matching full:symbol
23 SYMBOL = r"(?:\w*[A-Z0-9]\w*){2,}" variable
24 DEF = r"^\s*(?:menu){,1}config\s+(" + SYMBOL + r")\s*"
25 EXPR = r"(?:" + OPERATORS + r"|\s|" + SYMBOL + r")+"
28 SOURCE_SYMBOL = r"(?:\W|\b)+[D]{,1}CONFIG_(" + SYMBOL + r")"
32 REGEX_SYMBOL = re.compile(r'(?!\B)' + SYMBOL + r'(?!\B)')
162 for symbol in sorted(undefined_b):
163 # symbol has not been undefined before
164 if symbol not in undefined_a:
165 files = sorted(undefined_b.get(symbol))
166 undefined[symbol] = files
167 # check if there are new files that reference the undefined symbol
169 files = sorted(undefined_b.get(symbol) -
170 undefined_a.get(symbol))
172 undefined[symbol] = files
182 for symbol in sorted(undefined):
183 print(red(symbol))
185 files = sorted(undefined.get(symbol))
188 sims = find_sims(symbol, args.ignore, defined)
196 print("%s:" % yel("Commits changing symbol"))
197 commits = find_commits(symbol, args.diff)
236 def find_commits(symbol, diff): argument
237 """Find commits changing %symbol in the given range of %diff."""
240 symbol, diff])
270 def find_sims(symbol, ignore, defined=[]): argument
272 @symbol."""
274 return difflib.get_close_matches(symbol, set(defined), 10)
289 return difflib.get_close_matches(symbol, set(defined), 10)
310 """Find undefined Kconfig symbols and return a dict with the symbol as key
353 # inverse mapping of referenced_symbols to dict(symbol: [files])
356 for symbol in symbols:
357 inv_map[symbol] = inv_map.get(symbol, set())
358 inv_map[symbol].add(_file)
361 undefined = {} # {symbol: [files]}
362 for symbol in sorted(referenced_symbols):
364 if symbol == "FOO" or symbol == "BAR" or \
365 symbol == "FOO_BAR" or symbol == "XXX":
367 if symbol not in defined_symbols:
368 if symbol.endswith("_MODULE"):
370 if symbol[:-len("_MODULE")] in defined_symbols:
372 undefined[symbol] = referenced_symbols.get(symbol)
400 for symbol in symbols:
401 if not REGEX_FILTER_SYMBOLS.search(symbol):
403 references.append(symbol)
433 """Parse @kfile and update symbol definitions and references."""
461 for symbol in set(symbols):
462 if REGEX_NUMERIC.match(symbol):
465 references.append(symbol)