src/Pure/Tools/update_theorems.scala
changeset 75393 87ebf5a50283
parent 73340 0ffcad1f6130
child 75394 42267c650205
equal deleted inserted replaced
75388:b3ca4a6ed74b 75393:87ebf5a50283
     5 */
     5 */
     6 
     6 
     7 package isabelle
     7 package isabelle
     8 
     8 
     9 
     9 
    10 object Update_Theorems
    10 object Update_Theorems {
    11 {
    11   def update_theorems(path: Path): Unit = {
    12   def update_theorems(path: Path): Unit =
       
    13   {
       
    14     val text0 = File.read(path)
    12     val text0 = File.read(path)
    15     val text1 =
    13     val text1 =
    16       (for (tok <- Token.explode(Keyword.Keywords.empty, text0).iterator)
    14       (for (tok <- Token.explode(Keyword.Keywords.empty, text0).iterator)
    17         yield {
    15         yield {
    18           tok.source match {
    16           tok.source match {
    30 
    28 
    31 
    29 
    32   /* Isabelle tool wrapper */
    30   /* Isabelle tool wrapper */
    33 
    31 
    34   val isabelle_tool = Isabelle_Tool("update_theorems", "update toplevel theorem keywords",
    32   val isabelle_tool = Isabelle_Tool("update_theorems", "update toplevel theorem keywords",
    35     Scala_Project.here, args =>
    33     Scala_Project.here, args => {
    36   {
       
    37     val getopts = Getopts("""
    34     val getopts = Getopts("""
    38 Usage: isabelle update_theorems [FILES|DIRS...]
    35 Usage: isabelle update_theorems [FILES|DIRS...]
    39 
    36 
    40   Recursively find .thy files and update toplevel theorem keywords:
    37   Recursively find .thy files and update toplevel theorem keywords:
    41 
    38