@@ -50,11 +50,28 @@ cat std-grammarindex.ind |
50
50
51
51
# Find concept index entries missing a definition
52
52
cat std-conceptindex.ind |
53
- sed ' s/.hyperindexformat/\nhyperindexformat/' |
53
+ sed ' s/.hyperindexformat/\nhyperindexformat/;s/.hyperpage/hyperpage/ ' |
54
54
awk ' BEGIN { def=1 } /^ .item/ { if (def==0) { gsub("[{},]", "", item); print item } item=$NF; def=0; next } /hyperindexformat/ { def=1 }' |
55
55
sed ' s/^\(.*\)$/concept \1 has no definition/' |
56
56
fail || failed=1
57
57
58
+ # Find undecorated concept names in code blocks
59
+ patt=" ` cat std-conceptindex.ind |
60
+ sed ' s/.hyperindexformat/\nhyperindexformat/;s/.hyperpage/\nhyperpage/' |
61
+ sed -n ' s/^ .item.*{\([-a-z_]*\)}.*$/\1/p' ` "
62
+
63
+ patt=" ` echo $patt | sed ' s/ /\\\\|/g' ` "
64
+ # $patt contains all concept names, separated by \| to use as a sed regex
65
+
66
+ for f in * .tex; do
67
+ sed -n ' s,//.*$,,;s/%.*$//;s/"[^"]*"/""/;/begin{codeblock\(tu\)\?}/,/end{codeblock\(tu\)\?}/{/[^-_{a-z\]\(' " $patt " ' \)[^-_}a-z();]/{=;p;};}' $f |
68
+ # prefix output with filename and line
69
+ sed ' /^[0-9]\+$/{N;s/\n/:/;}' | sed " s/.*/$f :&/" |
70
+ grep -v " @.seebelow" |
71
+ sed " s/\$ / -- concept name without markup/" |
72
+ fail || failed=1
73
+ done
74
+
58
75
# Cross references since the previous standard.
59
76
function indexentries() { sed ' s,\\glossaryentry{\(.*\)@.*,\1,' " $1 " | LANG=C sort; }
60
77
function removals() { diff -u " $1 " " $2 " | grep ' ^-' | grep -v ' ^---' | sed ' s/^-//' ; }
0 commit comments