]> thyrsus.com Git - comparator.git/commitdiff
Add more shell keywords.
authorEric S. Raymond <esr@thyrsus.com>
Wed, 10 Sep 2003 19:50:34 +0000 (19:50 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 10 Sep 2003 19:50:34 +0000 (19:50 +0000)
filterator

index d7dff5bd1240156336718f9198afb636938fcb6e..a154425c1beccfde5a8b78699d475316185deddf 100755 (executable)
@@ -40,12 +40,13 @@ junk = {
         # Idioms that don't convey any meaning in isolation
         r"exit *[01];?",
         # Bare shell keywords
-        r"\bcase\b", r"\bdone\b", r"\bdo\b", r"\belse\b", r"\besac\b",
-        r"\bfi\b", r"\bif\b", r"\bwhile\b", 
+        r"\bbreak\b", r"\bcase\b", r"\bdone\b", r"\bdo\b", r"\belse\b",
+        r"\besac\b", r"\bfi\b", r"\bif\b", r"\breturn\b", r"\bshift\b",
+        r"\btrue\b", r"\bwhile\b", 
         # Blank comment
         "^#\n",
         # Ounctuation and whitespace
-        ':', '\n','\t', '\v'
+        ':', ';', '\n','\t', '\v'
         )),
     }
 
@@ -117,12 +118,14 @@ def report_common():
                         # -d and fails to supply it.
                         if count == 0:
                             print "Filter-Program: filterator 1.0"
-                            print "Filtering:", ("C-syntax", "none")[nofilter]
+                            print "Filtering:", ("language", "none")[nofilter]
                             print "Hash-Method: MD5"
                             if merge_program:
                                 print "Merge-Program:", merge_program
                             print "Normalization:", normalization
                             print "Shred-Size: %d" % shredsize
+                            if minsize:
+                                print "Minimum-Size: %d" % minsize
                             print "%%"
                         count += 1
                         lines += end - start + 1