changeset 00df5058a557 in /z/repo/gem5
details: http://repo.gem5.org/gem5?cmd=changeset;node=00df5058a557
description:
ISA parser: Match /* */ and // style comments.
Comments should not be scanned for operands, and we should look for
both /* */
style and // style.
diffstat:
src/arch/isa_parser.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diffs (13 lines):
diff -r b3585da1f970 -r 00df5058a557 src/arch/isa_parser.py
--- a/src/arch/isa_parser.py Mon Sep 05 18:36:26 2011 -0700
+++ b/src/arch/isa_parser.py Thu Sep 08 03:20:05 2011 -0700
@@ -856,7 +856,8 @@
# 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())
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev