Fix for issue #35, improve ifdef matching in Verilog parser

parent edb220cb
...@@ -182,7 +182,7 @@ class VerilogPreprocessor(object): ...@@ -182,7 +182,7 @@ class VerilogPreprocessor(object):
"define": "define":
re.compile(r"^\s*`define\s+(\w+)(?:\(([\w\s,]*)\))?(.*)"), re.compile(r"^\s*`define\s+(\w+)(?:\(([\w\s,]*)\))?(.*)"),
"ifdef_elsif": "ifdef_elsif":
re.compile(r"^\s*`(ifdef|ifndef|elsif)\s+(\w+)\s*$"), re.compile(r"^\s*`(ifdef|ifndef|elsif)\s+(\w+)[\s\S]*$"),
"endif_else": re.compile(r"^\s*`(endif|else)\s*$"), "endif_else": re.compile(r"^\s*`(endif|else)\s*$"),
"begin_protected": "begin_protected":
re.compile(r"^\s*`pragma\s*protect\s*begin_protected\s*$"), re.compile(r"^\s*`pragma\s*protect\s*begin_protected\s*$"),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment