diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2011-09-08 03:20:05 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2011-09-08 03:20:05 -0700 |
commit | f4dc64655f5ff3e0c33be7a9129ee423809e7a19 (patch) | |
tree | 92bc9f18956e506c54e45075ae556cbacde229fd /src/arch | |
parent | 87d687e242e3437e7e3a83e04bf9a403d95b3e9e (diff) | |
download | gem5-f4dc64655f5ff3e0c33be7a9129ee423809e7a19.tar.xz |
ISA parser: Match /* */ and // style comments.
Comments should not be scanned for operands, and we should look for both /* */
style and // style.
Diffstat (limited to 'src/arch')
-rwxr-xr-x | src/arch/isa_parser.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/arch/isa_parser.py b/src/arch/isa_parser.py index e17a02f01..e7598ffe8 100755 --- a/src/arch/isa_parser.py +++ b/src/arch/isa_parser.py @@ -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()) |