IsabelleSystem: provide Symbol.Interpretation;
authorwenzelm
Tue, 20 Jan 2009 18:05:21 +0100
changeset 29570 10fca82e688a
parent 29569 f3f529b5d8fb
child 29571 ba0cf984e593
IsabelleSystem: provide Symbol.Interpretation;
src/Pure/Tools/isabelle_system.scala
--- a/src/Pure/Tools/isabelle_system.scala	Tue Jan 20 18:04:37 2009 +0100
+++ b/src/Pure/Tools/isabelle_system.scala	Tue Jan 20 18:05:21 2009 +0100
@@ -143,4 +143,16 @@
     }
     logics.toList.sort(_ < _)
   }
+
+
+  /* symbols */
+
+  private def read_symbols(path: String) = {
+    val file = new File(platform_path(path))
+    if (file.canRead) Source.fromFile(file).getLines
+    else Iterator.empty
+  }
+  val symbols = new Symbol.Interpretation(
+    read_symbols("$ISABELLE_HOME/etc/symbols") ++
+    read_symbols("$ISABELLE_HOME_USER/etc/symbols"))
 }