[#73220] fix signal regex by including escape character

This commit is contained in:
Mateusz Gancarz 2025-02-20 15:19:14 +01:00
parent 760d444466
commit 1b6f8b79fa
1 changed files with 3 additions and 4 deletions

View File

@ -135,12 +135,11 @@ class SAIFParser:
instance.parent_instance = self.current_instance
self.current_instance = instance
line = line.replace('\\', '')
match = re.search(r'(\w+)\[*(\d*)\]*\s+(\(T(.+)\))+', line)
match = re.search(r'((?:[\w\[\]])+)(?:\\\[(\d+)\\\])*\s+(\(T.+\))+', line)
if match:
signal_name, bit_index, bit_values, _ = match.groups()
signal_name, bit_index, bit_values = match.groups()
if bit_index == '':
if bit_index == None:
bit_index = 0
if signal_name not in self.current_instance.nets: