projects
/
SymbiYosys.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b730e7
)
Improve handling of comments in .sby files
author
Clifford Wolf
<clifford@clifford.at>
Fri, 19 Jan 2018 13:26:42 +0000
(14:26 +0100)
committer
Clifford Wolf
<clifford@clifford.at>
Fri, 19 Jan 2018 13:26:42 +0000
(14:26 +0100)
sbysrc/sby_core.py
patch
|
blob
|
history
diff --git
a/sbysrc/sby_core.py
b/sbysrc/sby_core.py
index 9808485b281d9baf61d63abd5b2419a2f37872a4..10b45fd1526c9a5b4a5c1f68871cb56a8e54cc0a 100644
(file)
--- a/
sbysrc/sby_core.py
+++ b/
sbysrc/sby_core.py
@@
-188,12
+188,14
@@
class SbyJob:
with open("%s/config.sby" % workdir, "r") as f:
for line in f:
raw_line = line
- line = line.strip()
+ if mode in ["options", "engines", "files"]:
+ line = re.sub(r"\s*(\s#.*)?$", "", line)
+ if line == "" or line[0] == "#":
+ continue
+ else:
+ line = line.rstrip()
# print(line)
- if line == "" or line[0] == "#":
- continue
-
match = re.match(r"^\s*\[(.*)\]\s*$", line)
if match:
entries = match.group(1).split()