Skip to content

Commit

Permalink
Improving regexs that look for attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
std-max committed May 31, 2022
1 parent fbb46c6 commit e21bacf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vunit/test/bench.py
Original file line number Diff line number Diff line change
Expand Up @@ -559,8 +559,8 @@ def associate(attr):


_RE_ATTR_NAME = r"[a-zA-Z0-9_\-]+"
_RE_ATTRIBUTE = re.compile(r"vunit:\s*(?P<name>\.?" + _RE_ATTR_NAME + r")", re.IGNORECASE)
_RE_PRAGMA_LEGACY = re.compile(r"vunit_pragma\s+(?P<name>" + _RE_ATTR_NAME + ")", re.IGNORECASE)
_RE_ATTRIBUTE = re.compile(r"(?:--|\/\/)\s*vunit:\s*(?P<name>\.?" + _RE_ATTR_NAME + r")", re.IGNORECASE)
_RE_PRAGMA_LEGACY = re.compile(r"(?:--|\/\/)\s*vunit_pragma\s+(?P<name>" + _RE_ATTR_NAME + r")", re.IGNORECASE)
_VALID_ATTRIBUTES = ["run_all_in_same_sim", "fail_on_warning"]


Expand Down

0 comments on commit e21bacf

Please sign in to comment.