390
|
1 |
(* Title: Pure/Thy/ROOT.ML
|
0
|
2 |
ID: $Id$
|
390
|
3 |
Author: Sonia Mahjoub and Tobias Nipkow and
|
|
4 |
Markus Wenzel and Carsten Clasohm, TU Muenchen
|
0
|
5 |
|
390
|
6 |
This file builds the theory parser and autoloading system.
|
0
|
7 |
*)
|
|
8 |
|
390
|
9 |
(* FIXME remove (still needed by HOL/Datatype.ML) *)
|
|
10 |
use "scan.ML"; use "parse.ML";
|
|
11 |
|
|
12 |
use "thy_scan.ML";
|
|
13 |
use "thy_parse.ML";
|
|
14 |
use "thy_read.ML";
|
|
15 |
|
|
16 |
structure ThyScan = ThyScanFun(Scanner);
|
|
17 |
structure ThyParse = ThyParseFun(structure Symtab = Symtab
|
|
18 |
and ThyScan = ThyScan);
|
|
19 |
structure ThyRead = ThyReadFun(structure ThyParse = ThyParse);
|
|
20 |
open ThyRead;
|
0
|
21 |
|
|
22 |
|
390
|
23 |
(* FIXME tmp hack *)
|
0
|
24 |
|
390
|
25 |
fun eval txt =
|
|
26 |
let
|
|
27 |
val tmp_name = "/tmp/.eval.tmp";
|
|
28 |
val tmp_file = open_out tmp_name;
|
|
29 |
in
|
|
30 |
output (tmp_file, txt);
|
|
31 |
close_out tmp_file;
|
|
32 |
use tmp_name;
|
|
33 |
delete_file tmp_name
|
|
34 |
end;
|
0
|
35 |
|
74
|
36 |
|
390
|
37 |
fun init_thy_reader () =
|
|
38 |
eval (* FIXME use_string *)
|
|
39 |
"structure ThyRead = ThyReadFun(structure ThyParse = ThyParse);\n\
|
|
40 |
\ThyRead.loaded_thys := ! loaded_thys;\n\
|
|
41 |
\open ThyRead;\n";
|
|
42 |
|