equal
deleted
inserted
replaced
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 |