equal
deleted
inserted
replaced
62 val add_parsers: parser list -> unit |
62 val add_parsers: parser list -> unit |
63 val check_text: string * Position.T -> bool -> Toplevel.state -> unit |
63 val check_text: string * Position.T -> bool -> Toplevel.state -> unit |
64 val deps_thy: string -> bool -> Path.T -> string list * Path.T list |
64 val deps_thy: string -> bool -> Path.T -> string list * Path.T list |
65 val load_thy: string -> bool -> bool -> Path.T -> unit |
65 val load_thy: string -> bool -> bool -> Path.T -> unit |
66 val isar: bool -> bool -> unit Toplevel.isar |
66 val isar: bool -> bool -> unit Toplevel.isar |
67 val scan: string -> OuterLex.token list |
67 val scan: string -> OuterLex.token list |
68 val read: OuterLex.token list -> |
68 val read: OuterLex.token list -> (string * OuterLex.token list * Toplevel.transition) list |
69 (string * OuterLex.token list * Toplevel.transition) list |
|
70 end; |
69 end; |
71 |
70 |
72 structure OuterSyntax : OUTER_SYNTAX = |
71 structure OuterSyntax : OUTER_SYNTAX = |
73 struct |
72 struct |
74 |
73 |
266 |> T.source true get_lexicons |
265 |> T.source true get_lexicons |
267 (if no_pos then Position.none else Position.line_name 1 "stdin") |
266 (if no_pos then Position.none else Position.line_name 1 "stdin") |
268 |> toplevel_source term false true get_parser; |
267 |> toplevel_source term false true get_parser; |
269 |
268 |
270 |
269 |
271 (* scan text, read tokens with trace (for Proof General) *) |
270 (* scan text *) |
272 |
271 |
273 fun scan str = |
272 fun scan str = |
274 Source.of_string str |
273 Source.of_string str |
275 |> Symbol.source false |
274 |> Symbol.source false |
276 |> T.source true get_lexicons Position.none |
275 |> T.source true get_lexicons Position.none |
277 |> Source.exhaust |
276 |> Source.exhaust; |
|
277 |
|
278 |
|
279 (* read tokens with trace *) |
278 |
280 |
279 fun read toks = |
281 fun read toks = |
280 Source.of_list toks |
282 Source.of_list toks |
281 |> toplevel_source false true true get_parser |
283 |> toplevel_source false true true get_parser |
282 |> Source.exhaust |
284 |> Source.exhaust |
283 |> map (fn tr => (Toplevel.name_of tr, the (Toplevel.source_of tr), tr)); |
285 |> map (fn tr => (Toplevel.name_of tr, the (Toplevel.source_of tr), tr)); |
|
286 |
284 |
287 |
285 |
288 |
286 (** read theory **) |
289 (** read theory **) |
287 |
290 |
288 (* check_text *) |
291 (* check_text *) |