whoops, no ability to add comments in between functions in pseudocode
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 31 Jul 2021 18:37:48 +0000 (19:37 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sat, 31 Jul 2021 18:37:48 +0000 (19:37 +0100)
src/openpower/decoder/pseudo/functionreader.py

index 4447fde20384244aa2a39aff68d1b3720b7015de..c393e168db515811f91161360de3045ac8d2e79e 100644 (file)
@@ -73,6 +73,8 @@ class ISAFunctions:
                 print ("examining", repr(l))
                 if l.startswith("    "):
                     break
+                if l.startswith('<!--'):
+                    continue
 
             # get pseudocode
             li = [l[4:]] # first line detected with 4-space
@@ -82,6 +84,8 @@ class ISAFunctions:
                 if len(l) == 0:
                     li.append(l)
                     continue
+                if l.startswith('<!--'):
+                    continue
                 assert l.startswith('    '), ("4spcs not found in line %s" % l)
                 l = l[4:]  # lose 4 spaces
                 li.append(l)