diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-01-12 02:15:30 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-01-12 02:15:30 -0800 |
commit | 2e4dc6906a37a2506379fc2abac5508851b7fa16 (patch) | |
tree | 77c6db2d8815898bb4b46aecd522e1f24bc1c586 /checkman.txr | |
parent | 5b10b858a5258d044b9da30980e5dd992fd43df2 (diff) | |
download | txr-2e4dc6906a37a2506379fc2abac5508851b7fa16.tar.gz txr-2e4dc6906a37a2506379fc2abac5508851b7fa16.tar.bz2 txr-2e4dc6906a37a2506379fc2abac5508851b7fa16.zip |
Man page checker update.
* checkman.txr (check-func): Bugfix: neglect to scan .synb
sections for two types of headings. Include accessors, methods
and structs in the check.
(check-cblk): Use @(last) rather than @(until) so closing
.cble is consumed. Otherwise the new check for dangling
.cble will report false positives.
(check-spurious): New pattern function to detect dangling
.syne and .cble.
(main loop): Include a stand-alone .synb check for
the sake of special sections like Update expander.
Include check-spurious.
Diffstat (limited to 'checkman.txr')
-rw-r--r-- | checkman.txr | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/checkman.txr b/checkman.txr index af6b4056..7797f070 100644 --- a/checkman.txr +++ b/checkman.txr @@ -50,14 +50,18 @@ @(define check-func ()) @ (cases) .coNP Operator/function @(skip) +@ (assert bad ln `no .synb after Operator/function heading`) +@ (check-synb) @ (or) .coNP Operator @@ @op and macro @@ @mac +@ (assert bad ln `no .synb after Operator and macro heading`) +@ (check-synb) @ (or) -.coNP @{type /Function|Operator|Macro/}s@(assert bad ln `bad @{type}s heading`)@(rep :gap 0) @@, @{x /\S+/}@(last :mandatory) @@ @y and @@ @{z /\S+/}@(end) +.coNP @{type /Function|Operator|Macro|Accessor|Method|Structure/}s@(assert bad ln `bad @{type}s heading`)@(rep :gap 0) @@, @{x /\S+/}@(last :mandatory) @@ @y and @@ @{z /\S+/}@(end) @ (assert bad ln `no .synb after @{type}s heading`) @ (check-synb) @ (or) -.coNP @{type /Function|Operator|Macro/}@(assert bad ln `bad @type heading`) @@ @{x /\S+/}@junk +.coNP @{type /Function|Operator|Macro|Accessor|Method|Structure/}@(assert bad ln `bad @type heading`) @@ @{x /\S+/}@junk @ (assert bad ln `extra elements in singular @type heading`) @ (bind junk "") @ (assert bad ln `no .synb after @type heading`) @@ -91,11 +95,19 @@ @ (none) .cblk @ (end) -@ (until :mandatory) +@ (last :mandatory) .cble @ (end) @(end) @;; +@;; Check for various dangling +@;; macros. +@;; +@(define check-spurious ()) +@ {mac /.(cble|syne)/}@(skip) +@ (throw bad ln `dangling @mac`) +@(end) +@;; @;; Main @;; @(bind errors 0) @@ -110,6 +122,10 @@ @ (check-code) @ (or) @ (check-cblk) +@ (or) +@ (check-synb) +@ (or) +@ (check-spurious) @ (end) @ (catch bad (line msg)) @ (do (inc errors) |