mirror of
https://github.com/NawfalMotii79/PLFM_RADAR.git
synced 2026-06-11 07:51:17 +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 /
|
macros this script consumes are all integers. Comments / strings /
|
||||||
concat macros are ignored by the regex.
|
concat macros are ignored by the regex.
|
||||||
"""
|
"""
|
||||||
# Matches: `define RP_NAME <int-literal> [// comment]
|
# Grab RHS up to an optional `// ...` comment, then parse as int.
|
||||||
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.
|
|
||||||
line_pat = re.compile(r"^\s*`define\s+(RP_\w+)\s+([^/\n]+?)(?://.*)?$")
|
line_pat = re.compile(r"^\s*`define\s+(RP_\w+)\s+([^/\n]+?)(?://.*)?$")
|
||||||
params = {}
|
params = {}
|
||||||
with open(path) as f:
|
with open(path) as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user