Skip to content

Commit

Permalink
fixing parsing and adding test case
Browse files Browse the repository at this point in the history
  • Loading branch information
kanndil committed Sep 30, 2024
1 parent 087321b commit 748ad2f
Show file tree
Hide file tree
Showing 2 changed files with 79,981 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/PodemQuest/Circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ def parse_circuit_file(self, filename):
lines = file.readlines()

# Define regular expression patterns
input_pattern = re.compile(r"INPUT\(([\w_.]+)\)")
output_pattern = re.compile(r"OUTPUT\(([\w_.]+)\)")
gate_pattern = re.compile(r"([\w_.]+) = (\w+)\(([\w_. ,]+)\)")
input_pattern = re.compile(r"INPUT\(([\w_.\[\]0-9]+)\)")
output_pattern = re.compile(r"OUTPUT\(([\w_.\[\]0-9]+)\)")
gate_pattern = re.compile(r"([\w_.\[\]0-9]+) = (\w+)\(([\w_.\[\]0-9 ,]+)\)")

# Iterate over each line in the file
for line in lines:
Expand Down
Loading

0 comments on commit 748ad2f

Please sign in to comment.