lib/Tools/fixdots
author wenzelm
Thu, 09 Oct 1997 17:45:03 +0200
changeset 3824 9fdde15e3215
child 3825 478461d77e88
permissions -rwxr-xr-x
ensure that dots in formulas are followed by non-idents;

#!/bin/bash
#
# $Id$
#
# DESCRIPTION: ensure that dots in formulas are followed by non-idents


## diagnostics

PRG=$(basename $0)

function usage()
{
  echo
  echo "Usage: $PRG [FILES|DIRS...]"
  echo
  echo "  Recursively find .thy/.ML files, patching them to ensure that"
  echo "  dots in formulas are followed by non-idents."
  echo
  exit 1
}


## process command line

[ $# -eq 0 -o "$1" = "-?" ] && usage

SPECS="$@"; shift $#


## main

PERL=$(type -path perl)
if [ -z $PERL ]; then
  echo "$PRG fatal error: no perl!?"
else
  find $SPECS \( -name \*.thy -o -name \*.ML \) -print | \
    xargs $PERL $ISABELLE_HOME/lib/scripts/fixdots.pl
fi