add comment skipping in pagereader.py
[soc.git] / src / soc / decoder / pseudo / pagereader.py
index a5d05cc53eb51fdc4a63263bf2181f164d416282..8e9b0be39b66cc70afd45cbe09cca793c03a901c 100644 (file)
@@ -91,6 +91,14 @@ class ISA:
         rewrite.append(l)
         while lines:
             print(l)
+            # look for HTML comment, if starting, skip line.
+            # XXX this is braindead!  it doesn't look for the end
+            # so please put ending of comments on one line:
+            # <!-- line 1 comment -->
+            # <!-- line 2 comment -->
+            if l.startswith('<!--'):
+                print ("skipping comment", l)
+                continue
             # expect get heading
             assert l.startswith('#'), ("# not found in line %s" % l)