lib/Tools/fixdots
changeset 3824 9fdde15e3215
child 3825 478461d77e88
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/lib/Tools/fixdots	Thu Oct 09 17:45:03 1997 +0200
     1.3 @@ -0,0 +1,39 @@
     1.4 +#!/bin/bash
     1.5 +#
     1.6 +# $Id$
     1.7 +#
     1.8 +# DESCRIPTION: ensure that dots in formulas are followed by non-idents
     1.9 +
    1.10 +
    1.11 +## diagnostics
    1.12 +
    1.13 +PRG=$(basename $0)
    1.14 +
    1.15 +function usage()
    1.16 +{
    1.17 +  echo
    1.18 +  echo "Usage: $PRG [FILES|DIRS...]"
    1.19 +  echo
    1.20 +  echo "  Recursively find .thy/.ML files, patching them to ensure that"
    1.21 +  echo "  dots in formulas are followed by non-idents."
    1.22 +  echo
    1.23 +  exit 1
    1.24 +}
    1.25 +
    1.26 +
    1.27 +## process command line
    1.28 +
    1.29 +[ $# -eq 0 -o "$1" = "-?" ] && usage
    1.30 +
    1.31 +SPECS="$@"; shift $#
    1.32 +
    1.33 +
    1.34 +## main
    1.35 +
    1.36 +PERL=$(type -path perl)
    1.37 +if [ -z $PERL ]; then
    1.38 +  echo "$PRG fatal error: no perl!?"
    1.39 +else
    1.40 +  find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
    1.41 +    xargs $PERL $ISABELLE_HOME/lib/scripts/fixdots.pl
    1.42 +fi
    1.43 \ No newline at end of file