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