From fe7ff9b460cc2220a0ecf3abff187bf9bc4e6783 Mon Sep 17 00:00:00 2001 From: Matt Venn Date: Mon, 24 Apr 2023 12:28:09 +0200 Subject: [PATCH] fixed regex to ignore comments --- project.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project.py b/project.py index 5613123..fa3af1b 100644 --- a/project.py +++ b/project.py @@ -177,7 +177,7 @@ class Project(): # top module name is defined in one of the source files, which one? def find_top_verilog(self): - rgx_mod = re.compile(r"(?:^|[\W])module[\s]{1,}([\w]+)") + rgx_mod = re.compile(r"(?:^|[\s])module[\s]{1,}([\w]+)") top_verilog = [] for src in self.src_files: with open(os.path.join(self.local_dir, 'src', src)) as fh: