author | wenzelm |
Sat, 20 May 2006 23:36:57 +0200 | |
changeset 19688 | 877b763ded7e |
parent 18537 | 2681f9e34390 |
permissions | -rwxr-xr-x |
18537 | 1 |
#!/usr/bin/env perl |
2 |
# $Id$ |
|
3 |
||
4 |
use strict; |
|
5 |
||
6 |
my %defs = (); |
|
7 |
my %refs = (); |
|
8 |
||
9 |
while (<ARGV>) { |
|
10 |
if (m,\\glossaryentry\{\w*\\bf *((\w|\s)+)@,) { |
|
11 |
$defs{lc $1} = 1; |
|
12 |
} |
|
13 |
while (m,\\seeglossary *\{((\w|\s)+)\},g) { |
|
14 |
$refs{lc $1} = 1; |
|
15 |
} |
|
16 |
} |
|
17 |
||
18 |
print "Glossary definitions:\n"; |
|
19 |
foreach (sort(keys(%defs))) { |
|
20 |
print " \"$_\"\n"; |
|
21 |
} |
|
22 |
||
23 |
foreach (keys(%refs)) { |
|
24 |
s,s$,,; |
|
25 |
if (!defined($defs{$_})) { |
|
26 |
print "### Undefined glossary reference: \"$_\"\n"; |
|
27 |
} |
|
28 |
} |