obsolete;
authorwenzelm
Sun Feb 28 15:19:30 2016 +0100 (2016-02-28)
changeset 6244726861a913d6b
parent 62446 5b749c31eb97
child 62448 5ec1d01089e3
obsolete;
lib/Tools/update_semicolons
src/Pure/Tools/update_semicolons.scala
src/Pure/build-jars
     1.1 --- a/lib/Tools/update_semicolons	Sun Feb 28 15:12:24 2016 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,35 +0,0 @@
     1.4 -#!/usr/bin/env bash
     1.5 -#
     1.6 -# Author: Makarius
     1.7 -#
     1.8 -# DESCRIPTION: remove obsolete semicolons from theory sources
     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: isabelle $PRG [FILES|DIRS...]"
    1.19 -  echo
    1.20 -  echo "  Recursively find .thy files and remove obsolete semicolons."
    1.21 -  echo
    1.22 -  echo "  Old versions of files are preserved by appending \"~~\"."
    1.23 -  echo
    1.24 -  exit 1
    1.25 -}
    1.26 -
    1.27 -
    1.28 -## process command line
    1.29 -
    1.30 -[ "$#" -eq 0 -o "$1" = "-?" ] && usage
    1.31 -
    1.32 -SPECS="$@"; shift "$#"
    1.33 -
    1.34 -
    1.35 -## main
    1.36 -
    1.37 -find $SPECS -name \*.thy -print0 | \
    1.38 -  xargs -0 "$ISABELLE_TOOL" java isabelle.Update_Semicolons
     2.1 --- a/src/Pure/Tools/update_semicolons.scala	Sun Feb 28 15:12:24 2016 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,34 +0,0 @@
     2.4 -/*  Title:      Pure/Tools/update_semicolons.scala
     2.5 -    Author:     Makarius
     2.6 -
     2.7 -Remove obsolete semicolons from theory sources.
     2.8 -*/
     2.9 -
    2.10 -package isabelle
    2.11 -
    2.12 -
    2.13 -object Update_Semicolons
    2.14 -{
    2.15 -  def update_semicolons(path: Path)
    2.16 -  {
    2.17 -    val text0 = File.read(path)
    2.18 -    val text1 =
    2.19 -      (for (tok <- Token.explode(Keyword.Keywords.empty, text0).iterator if tok.source != ";")
    2.20 -        yield tok.source).mkString
    2.21 -
    2.22 -    if (text0 != text1) {
    2.23 -      Output.writeln("changing " + path)
    2.24 -      File.write_backup2(path, text1)
    2.25 -    }
    2.26 -  }
    2.27 -
    2.28 -
    2.29 -  /* command line entry point */
    2.30 -
    2.31 -  def main(args: Array[String])
    2.32 -  {
    2.33 -    Command_Line.tool0 {
    2.34 -      args.foreach(arg => update_semicolons(Path.explode(arg)))
    2.35 -    }
    2.36 -  }
    2.37 -}
     3.1 --- a/src/Pure/build-jars	Sun Feb 28 15:12:24 2016 +0100
     3.2 +++ b/src/Pure/build-jars	Sun Feb 28 15:19:30 2016 +0100
     3.3 @@ -108,7 +108,6 @@
     3.4    Tools/task_statistics.scala
     3.5    Tools/update_cartouches.scala
     3.6    Tools/update_header.scala
     3.7 -  Tools/update_semicolons.scala
     3.8    Tools/update_then.scala
     3.9    Tools/update_theorems.scala
    3.10    library.scala