Lines Matching full:line
19 This script uses a basic line based parser, therefore not all valid
191 for i, line in enumerate(content[::-1]):
192 if re.match(r"\s*};.*", line):
202 for line in content[:last_line]:
203 out.write(line)
236 for line in content[last_line:]:
237 out.write(line)
252 for line in content:
253 m = re.match(r'^#include\s+(?:"|<).*nrf.*(?:>|").*', line)
344 for i, line in enumerate(content):
346 m = re.match(r'^#include\s+".*-pinctrl\.dtsi".*', line)
352 m = re.match(r'^#include\s+(?:"|<)(.*)(?:>|").*', line)
358 m = re.match(r"^\s*/\s*{.*", line)
368 line = include_last_line + 1
370 line = max(0, root_line - 1)
372 content.insert(line, f'#include "{board}-pinctrl.dtsi"\n')
390 for line in content:
393 m = re.match(r"^[^&]*&([a-z0-9]+)\s*{[^}]*$", line)
411 if re.match(r"[^\/\*]*{.*", line):
414 elif re.match(r"[^\/\*]*}.*", line):
419 if re.match(r"[^\/\*]*pinctrl-\d+.*", line):
424 m = re.match(r"(\s+).*", line)
428 # process each device line, append states at the end
431 line = current_device.callback(config, current_device.signals, line)
433 line = (
435 + line
440 if line:
441 new_content.append(line)
457 config: DeviceConfiguration, signals: Dict[str, str], line: str
464 line: Line containing potential pin mapping.
467 Line if found a pin mapping, None otherwise.
471 m = re.match(r"\s*io-pins\s*=\s*([\s<>,0-9]+).*", line)
478 m = re.match(r"\s*([a-z]+\d?)-pins?\s*=\s*<(\d+)>.*", line)
483 return line
491 def process_uart(config: DeviceConfiguration, signals, line: str) -> Optional[str]:
494 # check if line specifies a pin
495 if not match_and_store_pin(config, signals, line):
499 m = re.match(r"\s*([a-z]+)-pull-up.*", line)
504 return line
507 def process_spi(config: DeviceConfiguration, signals, line: str) -> Optional[str]:
510 # check if line specifies a pin
511 if not match_and_store_pin(config, signals, line):
515 m = re.match(r"\s*miso-pull-up.*", line)
521 m = re.match(r"\s*miso-pull-down.*", line)
526 return line
529 def process_pwm(config: DeviceConfiguration, signals, line: str) -> Optional[str]:
532 # check if line specifies a pin
533 if not match_and_store_pin(config, signals, line):
537 m = re.match(r"\s*([a-z0-9]+)-inverted.*", line)
542 return line