doc-src/IsarImplementation/checkglossary
author haftmann
Fri Dec 29 12:11:04 2006 +0100 (2006-12-29)
changeset 21927 9677abe5d374
parent 18537 2681f9e34390
permissions -rwxr-xr-x
added handling for explicit classrel witnesses
     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 }