lib/Tools/fixdots
author wenzelm
Thu Oct 09 18:01:27 1997 +0200 (1997-10-09)
changeset 3825 478461d77e88
parent 3824 9fdde15e3215
child 3826 0caedb36900d
permissions -rwxr-xr-x
\n at end;
wenzelm@3824
     1
#!/bin/bash
wenzelm@3824
     2
#
wenzelm@3824
     3
# $Id$
wenzelm@3824
     4
#
wenzelm@3824
     5
# DESCRIPTION: ensure that dots in formulas are followed by non-idents
wenzelm@3824
     6
wenzelm@3824
     7
wenzelm@3824
     8
## diagnostics
wenzelm@3824
     9
wenzelm@3824
    10
PRG=$(basename $0)
wenzelm@3824
    11
wenzelm@3824
    12
function usage()
wenzelm@3824
    13
{
wenzelm@3824
    14
  echo
wenzelm@3824
    15
  echo "Usage: $PRG [FILES|DIRS...]"
wenzelm@3824
    16
  echo
wenzelm@3824
    17
  echo "  Recursively find .thy/.ML files, patching them to ensure that"
wenzelm@3824
    18
  echo "  dots in formulas are followed by non-idents."
wenzelm@3824
    19
  echo
wenzelm@3824
    20
  exit 1
wenzelm@3824
    21
}
wenzelm@3824
    22
wenzelm@3824
    23
wenzelm@3824
    24
## process command line
wenzelm@3824
    25
wenzelm@3824
    26
[ $# -eq 0 -o "$1" = "-?" ] && usage
wenzelm@3824
    27
wenzelm@3824
    28
SPECS="$@"; shift $#
wenzelm@3824
    29
wenzelm@3824
    30
wenzelm@3824
    31
## main
wenzelm@3824
    32
wenzelm@3824
    33
PERL=$(type -path perl)
wenzelm@3824
    34
if [ -z $PERL ]; then
wenzelm@3824
    35
  echo "$PRG fatal error: no perl!?"
wenzelm@3824
    36
else
wenzelm@3824
    37
  find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
wenzelm@3824
    38
    xargs $PERL $ISABELLE_HOME/lib/scripts/fixdots.pl
wenzelm@3825
    39
fi