equal
deleted
inserted
replaced
19 signature OUTER_SYNTAX = |
19 signature OUTER_SYNTAX = |
20 sig |
20 sig |
21 include BASIC_OUTER_SYNTAX |
21 include BASIC_OUTER_SYNTAX |
22 type token |
22 type token |
23 type parser |
23 type parser |
24 val parser: bool -> string -> string -> |
|
25 (token list -> (Toplevel.transition -> Toplevel.transition) * token list) -> parser |
|
26 val command: string -> string -> |
24 val command: string -> string -> |
27 (token list -> (Toplevel.transition -> Toplevel.transition) * token list) -> parser |
25 (token list -> (Toplevel.transition -> Toplevel.transition) * token list) -> parser |
28 val improper_command: string -> string -> |
26 val improper_command: string -> string -> |
29 (token list -> (Toplevel.transition -> Toplevel.transition) * token list) -> parser |
27 (token list -> (Toplevel.transition -> Toplevel.transition) * token list) -> parser |
30 val print_outer_syntax: unit -> unit |
28 val print_outer_syntax: unit -> unit |
50 |
48 |
51 datatype parser = |
49 datatype parser = |
52 Parser of string * string * bool * parser_fn; |
50 Parser of string * string * bool * parser_fn; |
53 |
51 |
54 fun parser int_only name comment parse = Parser (name, comment, int_only, parse); |
52 fun parser int_only name comment parse = Parser (name, comment, int_only, parse); |
55 |
|
56 val command_parser = parser false; |
|
57 val improper_command_parser = parser true; |
|
58 |
53 |
59 |
54 |
60 (* parse command *) |
55 (* parse command *) |
61 |
56 |
62 local open OuterParse in |
57 local open OuterParse in |
295 writeln ("This is Isabelle's underlying ML system (" ^ ml_system ^ ");\n\ |
290 writeln ("This is Isabelle's underlying ML system (" ^ ml_system ^ ");\n\ |
296 \invoke 'loop();' to enter the Isar loop."); |
291 \invoke 'loop();' to enter the Isar loop."); |
297 |
292 |
298 |
293 |
299 (*final declarations of this structure!*) |
294 (*final declarations of this structure!*) |
300 val command = command_parser; |
295 val command = parser false; |
301 val improper_command = improper_command_parser; |
296 val improper_command = parser true; |
|
297 |
302 |
298 |
303 end; |
299 end; |
304 |
300 |
305 (*setup theory syntax dependent operations*) |
301 (*setup theory syntax dependent operations*) |
306 ThyLoad.deps_thy_fn := OuterSyntax.deps_thy; |
302 ThyLoad.deps_thy_fn := OuterSyntax.deps_thy; |