ISA parser: Match /* */ and // style comments.
Comments should not be scanned for operands, and we should look for both /* */ style and // style.
This commit is contained in:
@@ -856,7 +856,8 @@ class SubOperandList(OperandList):
|
||||
|
||||
# Regular expression object to match C++ comments
|
||||
# (used in findOperands())
|
||||
commentRE = re.compile(r'//.*\n')
|
||||
commentRE = re.compile(r'(^)?[^\S\n]*/(?:\*(.*?)\*/[^\S\n]*|/[^\n]*)($)?',
|
||||
re.DOTALL | re.MULTILINE)
|
||||
|
||||
# Regular expression object to match assignment statements
|
||||
# (used in findOperands())
|
||||
|
||||
Reference in New Issue
Block a user