src/Pure/Isar/outer_syntax.ML
changeset 37902 4e7864f3643d
parent 37873 66d90b2b87bc
child 37907 f18c4bc8b028
equal deleted inserted replaced
37901:ea7d4423cb5b 37902:4e7864f3643d
    29   val parse: Position.T -> string -> Toplevel.transition list
    29   val parse: Position.T -> string -> Toplevel.transition list
    30   val process_file: Path.T -> theory -> theory
    30   val process_file: Path.T -> theory -> theory
    31   type isar
    31   type isar
    32   val isar: bool -> isar
    32   val isar: bool -> isar
    33   val prepare_command: Position.T -> string -> Toplevel.transition
    33   val prepare_command: Position.T -> string -> Toplevel.transition
    34   val load_thy: string -> Position.T -> string list -> unit -> unit
    34   val load_thy: string -> Position.T -> string -> unit -> unit
    35 end;
    35 end;
    36 
    36 
    37 structure Outer_Syntax: OUTER_SYNTAX =
    37 structure Outer_Syntax: OUTER_SYNTAX =
    38 struct
    38 struct
    39 
    39 
   273     val (lexs, commands) = get_syntax ();
   273     val (lexs, commands) = get_syntax ();
   274     val time = ! Output.timing;
   274     val time = ! Output.timing;
   275 
   275 
   276     val _ = Present.init_theory name;
   276     val _ = Present.init_theory name;
   277 
   277 
   278     val toks = Source.exhausted (Thy_Syntax.token_source lexs pos (Source.of_list text));
   278     val toks = Source.exhausted (Thy_Syntax.token_source lexs pos (Source.of_string text));
   279     val spans = Source.exhaust (Thy_Syntax.span_source toks);
   279     val spans = Source.exhaust (Thy_Syntax.span_source toks);
   280     val _ = List.app Thy_Syntax.report_span spans;
   280     val _ = List.app Thy_Syntax.report_span spans;
   281     val units = Source.exhaust (Thy_Syntax.unit_source (Source.of_list spans))
   281     val units = Source.exhaust (Thy_Syntax.unit_source (Source.of_list spans))
   282       |> maps (prepare_unit commands);
   282       |> maps (prepare_unit commands);
   283 
   283