579
|
1 |
|
7744
|
2 |
(* FIXME get rid of this!! *)
|
579
|
3 |
|
|
4 |
|
1390
|
5 |
(*Read a term from string "b", with expected type T*)
|
|
6 |
fun readtm sign T b =
|
|
7 |
read_cterm sign (b,T) |> term_of
|
3536
|
8 |
handle ERROR => error ("The error(s) above occurred for " ^ b);
|
579
|
9 |
|
7744
|
10 |
|
|
11 |
(* FIXME broken! *)
|
579
|
12 |
|
7744
|
13 |
(*Skipping initial blanks, find the first identifier*)
|
|
14 |
fun scan_to_id s =
|
4695
|
15 |
s |> Symbol.explode
|
4938
|
16 |
|> Scan.error (Scan.finite Symbol.stopper
|
4695
|
17 |
(!! (fn _ => "Expected to find an identifier in " ^ s)
|
|
18 |
(Scan.any Symbol.is_blank |-- Syntax.scan_id)))
|
|
19 |
|> #1;
|