3 # A script to scan PCRE's man pages to check for typos in the control
4 # sequences. I use only a small set of the available repertoire, so it is
5 # straightforward to check that nothing else has slipped in by mistake. This
6 # script should be called in the doc directory.
10 while (scalar(@ARGV) > 0)
15 open (IN
, $file) || die "Failed to open $file\n";
22 printf "Empty line $line of $file\n";
41 ^\
.\\"(?:\ HREF)?\s*$|
42 ^\.\\"\sHTML\s
<a\shref
="[^"]+?
">\s*$|
43 ^\.\\"\sHTML\s
<a\sname
="[^"]+?
"><\/a>\s*$|
49 printf "Bad control line $line of $file\n";
55 if (/\\[^ef]|\\f[^IBP]/)
57 printf "Bad backslash in line $line of $file\n";