doc-src/IsarImplementation/checkglossary
author huffman
Sat, 16 Sep 2006 19:12:03 +0200
changeset 20554 c433e78d4203
parent 18537 2681f9e34390
permissions -rwxr-xr-x
define new constant of_real for class real_algebra_1; define set Reals as range of_real; add lemmas about of_real and Reals

#!/usr/bin/env perl
# $Id$

use strict;

my %defs = ();
my %refs = ();

while (<ARGV>) {
    if (m,\\glossaryentry\{\w*\\bf *((\w|\s)+)@,) {
	$defs{lc $1} = 1;
    }
    while (m,\\seeglossary *\{((\w|\s)+)\},g) {
	$refs{lc $1} = 1;
    }
}

print "Glossary definitions:\n";
foreach (sort(keys(%defs))) {
    print "  \"$_\"\n";
}

foreach (keys(%refs)) {
    s,s$,,;
    if (!defined($defs{$_})) {
	print "### Undefined glossary reference: \"$_\"\n";
    }
}