mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-05-14 11:51:47 +00:00
style(fpga): drop dead regex in gen_chirp_mem parser
Leftover from two alternative parsing approaches; the unused pat triggered ruff F841. Only line_pat is actually used.
This commit is contained in:
@@ -62,12 +62,7 @@ def _parse_radar_params(path):
|
||||
macros this script consumes are all integers. Comments / strings /
|
||||
concat macros are ignored by the regex.
|
||||
"""
|
||||
# Matches: `define RP_NAME <int-literal> [// comment]
|
||||
pat = re.compile(
|
||||
r"^\s*`define\s+(RP_\w+)\s+"
|
||||
r"(?:(\d+)'[bdh][0-9a-fA-F_]+|0[xX][0-9a-fA-F]+|\d+)"
|
||||
)
|
||||
# Simpler: grab the whole RHS up to comment, then eval as int.
|
||||
# Grab RHS up to an optional `// ...` comment, then parse as int.
|
||||
line_pat = re.compile(r"^\s*`define\s+(RP_\w+)\s+([^/\n]+?)(?://.*)?$")
|
||||
params = {}
|
||||
with open(path) as f:
|
||||
|
||||
Reference in New Issue
Block a user