Skip to content

Commit

Permalink
Reformat opsymbols.py with slightly different settings.
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesstaats committed Dec 29, 2024
1 parent 0a3e0cb commit 1628b9f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions opsymbols.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@

# Parse command-line arguments
parser = argparse.ArgumentParser(description="Extract operator symbols.")
parser.add_argument(
"--campfile", required=True, help="Input lex file (camp.l)"
)
parser.add_argument("--campfile", required=True, help="Input lex file (camp.l)")
parser.add_argument("--output", required=True, help="Output header file")
args = parser.parse_args()

Expand Down Expand Up @@ -55,9 +53,7 @@ def add(symbol, name):
if match:
add(match.group(1), match.group(2))
continue
match = re.search(
r"^\s*EXTRASYMBOL\(\s*(\w+)\s*,\s*(\w+)\s*\)", line
)
match = re.search(r"^\s*EXTRASYMBOL\(\s*(\w+)\s*,\s*(\w+)\s*\)", line)
if match:
add(match.group(1), match.group(2))
continue
Expand Down

0 comments on commit 1628b9f

Please sign in to comment.