lib/Tools/unsymbolize
author wenzelm
Sat Jul 25 10:31:27 2009 +0200 (2009-07-25)
changeset 32187 cca43ca13f4f
parent 29143 72c960b2b83e
child 35022 c844b93dd147
permissions -rwxr-xr-x
renamed structure Display_Goal to Goal_Display;
     1 #!/usr/bin/env bash
     2 #
     3 # Author: Markus Wenzel, TU Muenchen
     4 #
     5 # DESCRIPTION: remove unreadable symbol names from sources
     6 
     7 
     8 ## diagnostics
     9 
    10 PRG="$(basename "$0")"
    11 
    12 function usage()
    13 {
    14   echo
    15   echo "Usage: isabelle $PRG [FILES|DIRS...]"
    16   echo
    17   echo "  Recursively find .thy/.ML files, removing unreadable symbol names."
    18   echo "  Note: this is an ad-hoc script; there is no systematic way to replace"
    19   echo "  symbols independently of the inner syntax of a theory!"
    20   echo
    21   echo "  Renames old versions of FILES by appending \"~~\"."
    22   echo
    23   exit 1
    24 }
    25 
    26 
    27 ## process command line
    28 
    29 [ "$#" -eq 0 -o "$1" = "-?" ] && usage
    30 
    31 SPECS="$@"; shift "$#"
    32 
    33 
    34 ## main
    35 
    36 find $SPECS \( -name \*.ML -o -name \*.thy \) -print | \
    37   xargs perl -w "$ISABELLE_HOME/lib/scripts/unsymbolize.pl"