src/Pure/Isar/outer_parse.ML
author wenzelm
Thu Nov 22 23:45:23 2001 +0100 (2001-11-22)
changeset 12272 9bc50336dab6
parent 12268 28e60c998eee
child 12876 a70df1e5bf10
permissions -rw-r--r--
improved locale expression syntax;
wenzelm@5826
     1
(*  Title:      Pure/Isar/outer_parse.ML
wenzelm@5826
     2
    ID:         $Id$
wenzelm@5826
     3
    Author:     Markus Wenzel, TU Muenchen
wenzelm@8807
     4
    License:    GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@5826
     5
wenzelm@5826
     6
Generic parsers for Isabelle/Isar outer syntax.
wenzelm@5826
     7
*)
wenzelm@5826
     8
wenzelm@5826
     9
signature OUTER_PARSE =
wenzelm@5826
    10
sig
wenzelm@5826
    11
  type token
wenzelm@5826
    12
  val group: string -> (token list -> 'a) -> token list -> 'a
wenzelm@5826
    13
  val !!! : (token list -> 'a) -> token list -> 'a
wenzelm@8581
    14
  val !!!! : (token list -> 'a) -> token list -> 'a
wenzelm@12047
    15
  val triple1: ('a * 'b) * 'c -> 'a * 'b * 'c
wenzelm@12047
    16
  val triple2: 'a * ('b * 'c) -> 'a * 'b * 'c
wenzelm@12047
    17
  val triple_swap: ('a * 'b) * 'c -> ('a * 'c) * 'b
wenzelm@5826
    18
  val $$$ : string -> token list -> string * token list
wenzelm@9131
    19
  val semicolon: token list -> string * token list
wenzelm@11792
    20
  val underscore: token list -> string * token list
wenzelm@5826
    21
  val position: (token list -> 'a * 'b) -> token list -> ('a * Position.T) * 'b
wenzelm@7026
    22
  val command: token list -> string * token list
wenzelm@5826
    23
  val keyword: token list -> string * token list
wenzelm@5826
    24
  val short_ident: token list -> string * token list
wenzelm@5826
    25
  val long_ident: token list -> string * token list
wenzelm@5826
    26
  val sym_ident: token list -> string * token list
wenzelm@5826
    27
  val term_var: token list -> string * token list
wenzelm@5826
    28
  val type_ident: token list -> string * token list
wenzelm@5826
    29
  val type_var: token list -> string * token list
wenzelm@5826
    30
  val number: token list -> string * token list
wenzelm@5826
    31
  val string: token list -> string * token list
wenzelm@5826
    32
  val verbatim: token list -> string * token list
wenzelm@6860
    33
  val sync: token list -> string * token list
wenzelm@5826
    34
  val eof: token list -> string * token list
wenzelm@5826
    35
  val not_eof: token list -> token * token list
wenzelm@7930
    36
  val opt_unit: token list -> unit * token list
wenzelm@5826
    37
  val nat: token list -> int * token list
wenzelm@5826
    38
  val enum: string -> (token list -> 'a * token list) -> token list -> 'a list * token list
wenzelm@5826
    39
  val enum1: string -> (token list -> 'a * token list) -> token list -> 'a list * token list
wenzelm@5826
    40
  val list: (token list -> 'a * token list) -> token list -> 'a list * token list
wenzelm@5826
    41
  val list1: (token list -> 'a * token list) -> token list -> 'a list * token list
wenzelm@6013
    42
  val and_list: (token list -> 'a * token list) -> token list -> 'a list * token list
wenzelm@6013
    43
  val and_list1: (token list -> 'a * token list) -> token list -> 'a list * token list
wenzelm@5826
    44
  val name: token list -> bstring * token list
wenzelm@5826
    45
  val xname: token list -> xstring * token list
wenzelm@5826
    46
  val text: token list -> string * token list
wenzelm@12268
    47
  val uname: token list -> string option * token list
wenzelm@6553
    48
  val comment: token list -> Comment.text * token list
wenzelm@6553
    49
  val marg_comment: token list -> Comment.text * token list
wenzelm@6553
    50
  val interest: token list -> Comment.interest * token list
wenzelm@8897
    51
  val sort: token list -> string * token list
wenzelm@8897
    52
  val arity: token list -> (string list * string) * token list
wenzelm@8897
    53
  val simple_arity: token list -> (string list * xclass) * token list
wenzelm@5826
    54
  val type_args: token list -> string list * token list
wenzelm@5826
    55
  val typ: token list -> string * token list
wenzelm@5826
    56
  val opt_infix: token list -> Syntax.mixfix * token list
wenzelm@5826
    57
  val opt_mixfix: token list -> Syntax.mixfix * token list
wenzelm@9037
    58
  val opt_infix': token list -> Syntax.mixfix * token list
wenzelm@9037
    59
  val opt_mixfix': token list -> Syntax.mixfix * token list
wenzelm@5826
    60
  val const: token list -> (bstring * string * Syntax.mixfix) * token list
wenzelm@5826
    61
  val term: token list -> string * token list
wenzelm@5826
    62
  val prop: token list -> string * token list
wenzelm@6935
    63
  val propp: token list -> (string * (string list * string list)) * token list
wenzelm@6949
    64
  val termp: token list -> (string * string list) * token list
wenzelm@9131
    65
  val arguments: token list -> Args.T list * token list
wenzelm@5826
    66
  val attribs: token list -> Args.src list * token list
wenzelm@5826
    67
  val opt_attribs: token list -> Args.src list * token list
wenzelm@5917
    68
  val thm_name: string -> token list -> (bstring * Args.src list) * token list
wenzelm@5917
    69
  val opt_thm_name: string -> token list -> (bstring * Args.src list) * token list
wenzelm@6372
    70
  val spec_name: token list -> ((bstring * string) * Args.src list) * token list
wenzelm@6372
    71
  val spec_opt_name: token list -> ((bstring * string) * Args.src list) * token list
wenzelm@5917
    72
  val xthm: token list -> (xstring * Args.src list) * token list
wenzelm@5917
    73
  val xthms1: token list -> (xstring * Args.src list) list * token list
wenzelm@12272
    74
  val locale_expr: token list -> Locale.expr * token list
wenzelm@12047
    75
  val locale_element: token list -> Args.src Locale.element * token list
wenzelm@5826
    76
  val method: token list -> Method.text * token list
wenzelm@5826
    77
end;
wenzelm@5826
    78
wenzelm@5826
    79
structure OuterParse: OUTER_PARSE =
wenzelm@5826
    80
struct
wenzelm@5826
    81
wenzelm@9131
    82
structure T = OuterLex;
wenzelm@9131
    83
type token = T.token;
wenzelm@5826
    84
wenzelm@5826
    85
wenzelm@5826
    86
(** error handling **)
wenzelm@5826
    87
wenzelm@5826
    88
(* group atomic parsers (no cuts!) *)
wenzelm@5826
    89
wenzelm@5826
    90
fun fail_with s = Scan.fail_with
wenzelm@5826
    91
  (fn [] => s ^ " expected (past end-of-file!)"
wenzelm@9155
    92
    | (tok :: _) => s ^ " expected,\nbut " ^ T.name_of tok ^ T.pos_of tok ^ " was found");
wenzelm@5826
    93
wenzelm@5826
    94
fun group s scan = scan || fail_with s;
wenzelm@5826
    95
wenzelm@5826
    96
wenzelm@5877
    97
(* cut *)
wenzelm@5826
    98
wenzelm@8581
    99
fun cut kind scan =
wenzelm@5826
   100
  let
wenzelm@5826
   101
    fun get_pos [] = " (past end-of-file!)"
wenzelm@9131
   102
      | get_pos (tok :: _) = T.pos_of tok;
wenzelm@5826
   103
wenzelm@8581
   104
    fun err (toks, None) = kind ^ get_pos toks
wenzelm@8581
   105
      | err (toks, Some msg) = kind ^ get_pos toks ^ ": " ^ msg;
wenzelm@5826
   106
  in Scan.!! err scan end;
wenzelm@5826
   107
wenzelm@8586
   108
fun !!! scan = cut "Outer syntax error" scan;
wenzelm@8586
   109
fun !!!! scan = cut "Corrupted outer syntax in presentation" scan;
wenzelm@8581
   110
wenzelm@5826
   111
wenzelm@5826
   112
wenzelm@5826
   113
(** basic parsers **)
wenzelm@5826
   114
wenzelm@5826
   115
(* utils *)
wenzelm@5826
   116
wenzelm@5826
   117
fun triple1 ((x, y), z) = (x, y, z);
wenzelm@5826
   118
fun triple2 (x, (y, z)) = (x, y, z);
wenzelm@6430
   119
fun triple_swap ((x, y), z) = ((x, z), y);
wenzelm@5826
   120
wenzelm@5826
   121
wenzelm@5826
   122
(* tokens *)
wenzelm@5826
   123
wenzelm@5826
   124
fun position scan =
wenzelm@9131
   125
  (Scan.ahead (Scan.one T.not_eof) >> T.position_of) -- scan >> Library.swap;
wenzelm@5826
   126
wenzelm@5826
   127
fun kind k =
wenzelm@9131
   128
  group (T.str_of_kind k) (Scan.one (T.is_kind k) >> T.val_of);
wenzelm@5826
   129
wenzelm@9131
   130
val command = kind T.Command;
wenzelm@9131
   131
val keyword = kind T.Keyword;
wenzelm@9131
   132
val short_ident = kind T.Ident;
wenzelm@9131
   133
val long_ident = kind T.LongIdent;
wenzelm@9131
   134
val sym_ident = kind T.SymIdent;
wenzelm@9131
   135
val term_var = kind T.Var;
wenzelm@9131
   136
val type_ident = kind T.TypeIdent;
wenzelm@9131
   137
val type_var = kind T.TypeVar;
wenzelm@9131
   138
val number = kind T.Nat;
wenzelm@9131
   139
val string = kind T.String;
wenzelm@9131
   140
val verbatim = kind T.Verbatim;
wenzelm@9131
   141
val sync = kind T.Sync;
wenzelm@9131
   142
val eof = kind T.EOF;
wenzelm@5826
   143
wenzelm@5826
   144
fun $$$ x =
wenzelm@9131
   145
  group (T.str_of_kind T.Keyword ^ " " ^ quote x)
wenzelm@9131
   146
    (Scan.one (T.keyword_with (equal x)) >> T.val_of);
wenzelm@9131
   147
wenzelm@9131
   148
val semicolon = $$$ ";";
wenzelm@5826
   149
wenzelm@11792
   150
val underscore = sym_ident :-- (fn "_" => Scan.succeed () | _ => Scan.fail) >> #1;
wenzelm@11792
   151
wenzelm@5877
   152
val nat = number >> (fst o Term.read_int o Symbol.explode);
wenzelm@5826
   153
wenzelm@9131
   154
val not_eof = Scan.one T.not_eof;
wenzelm@5826
   155
wenzelm@7930
   156
val opt_unit = Scan.optional ($$$ "(" -- $$$ ")" >> (K ())) ();
wenzelm@7930
   157
wenzelm@5826
   158
wenzelm@5826
   159
(* enumerations *)
wenzelm@5826
   160
wenzelm@6003
   161
fun enum1 sep scan = scan -- Scan.repeat ($$$ sep |-- !!! scan) >> op ::;
wenzelm@5826
   162
fun enum sep scan = enum1 sep scan || Scan.succeed [];
wenzelm@5826
   163
wenzelm@5826
   164
fun list1 scan = enum1 "," scan;
wenzelm@5826
   165
fun list scan = enum "," scan;
wenzelm@5826
   166
wenzelm@6013
   167
fun and_list1 scan = enum1 "and" scan;
wenzelm@6013
   168
fun and_list scan = enum "and" scan;
wenzelm@6013
   169
wenzelm@5826
   170
wenzelm@5960
   171
(* names and text *)
wenzelm@5826
   172
wenzelm@8146
   173
val name = group "name declaration" (short_ident || sym_ident || string || number);
wenzelm@8146
   174
val xname = group "name reference" (short_ident || long_ident || sym_ident || string || number);
wenzelm@8146
   175
val text = group "text" (short_ident || long_ident || sym_ident || string || number || verbatim);
wenzelm@6553
   176
wenzelm@12268
   177
val uname = underscore >> K None || name >> Some;
wenzelm@12268
   178
wenzelm@6553
   179
wenzelm@6553
   180
(* formal comments *)
wenzelm@6553
   181
wenzelm@8077
   182
val comment = text >> (Comment.plain o Library.single);
wenzelm@8077
   183
val marg_comment = Scan.repeat ($$$ "--" |-- text) >> Comment.plain;
wenzelm@7171
   184
wenzelm@7171
   185
val interest = Scan.optional ($$$ "%%" >> K Comment.no_interest ||
wenzelm@7171
   186
  $$$ "%" |-- Scan.optional nat 1 >> Comment.interest) Comment.default_interest;
wenzelm@5826
   187
wenzelm@5826
   188
wenzelm@6372
   189
(* sorts and arities *)
wenzelm@5826
   190
wenzelm@8897
   191
val sort = group "sort" xname;
wenzelm@5826
   192
wenzelm@6372
   193
fun gen_arity cod =
wenzelm@7352
   194
  Scan.optional ($$$ "(" |-- !!! (list1 sort --| $$$ ")")) [] -- cod;
wenzelm@6372
   195
wenzelm@6372
   196
val arity = gen_arity sort;
wenzelm@8897
   197
val simple_arity = gen_arity xname;
wenzelm@5826
   198
wenzelm@5826
   199
wenzelm@5826
   200
(* types *)
wenzelm@5826
   201
wenzelm@8146
   202
val typ = group "type"
wenzelm@8146
   203
  (short_ident || long_ident || sym_ident || type_ident || type_var || string || number);
wenzelm@5826
   204
wenzelm@5826
   205
val type_args =
wenzelm@5826
   206
  type_ident >> single ||
wenzelm@5826
   207
  $$$ "(" |-- !!! (list1 type_ident --| $$$ ")") ||
wenzelm@5826
   208
  Scan.succeed [];
wenzelm@5826
   209
wenzelm@5826
   210
wenzelm@5826
   211
(* mixfix annotations *)
wenzelm@5826
   212
wenzelm@11651
   213
val infx = $$$ "infix" |-- !!! (nat >> Syntax.Infix || string -- nat >> Syntax.InfixName);
wenzelm@5826
   214
val infxl = $$$ "infixl" |-- !!! (nat >> Syntax.Infixl || string -- nat >> Syntax.InfixlName);
wenzelm@5826
   215
val infxr = $$$ "infixr" |-- !!! (nat >> Syntax.Infixr || string -- nat >> Syntax.InfixrName);
wenzelm@5826
   216
wenzelm@5826
   217
val binder =
wenzelm@5826
   218
  $$$ "binder" |--
wenzelm@5826
   219
    !!! (string -- ($$$ "[" |-- nat --| $$$ "]" -- nat || nat >> (fn n => (n, n))))
wenzelm@5826
   220
  >> (Syntax.Binder o triple2);
wenzelm@5826
   221
wenzelm@5826
   222
wenzelm@5826
   223
val opt_pris = Scan.optional ($$$ "[" |-- !!! (list nat --| $$$ "]")) [];
wenzelm@5826
   224
wenzelm@5826
   225
val mixfix =
wenzelm@8648
   226
  (string -- !!! (opt_pris -- Scan.optional nat Syntax.max_pri))
wenzelm@8648
   227
  >> (Syntax.Mixfix o triple2);
wenzelm@5826
   228
wenzelm@9037
   229
fun opt_fix guard fix =
wenzelm@9037
   230
  Scan.optional ($$$ "(" |-- guard (fix --| $$$ ")")) Syntax.NoSyn;
wenzelm@5826
   231
wenzelm@11651
   232
val opt_infix = opt_fix !!! (infxl || infxr || infx);
wenzelm@11651
   233
val opt_mixfix = opt_fix !!! (mixfix || binder || infxl || infxr || infx);
wenzelm@9037
   234
wenzelm@11651
   235
val opt_infix' = opt_fix I (infxl || infxr || infx);
wenzelm@11651
   236
val opt_mixfix' = opt_fix I (mixfix || binder || infxl || infxr || infx);
wenzelm@5826
   237
wenzelm@5826
   238
wenzelm@5826
   239
(* consts *)
wenzelm@5826
   240
wenzelm@5826
   241
val const =
wenzelm@5826
   242
  name -- ($$$ "::" |-- !!! (typ -- opt_mixfix)) >> triple2;
wenzelm@5826
   243
wenzelm@5826
   244
wenzelm@5826
   245
(* terms *)
wenzelm@5826
   246
wenzelm@7477
   247
val trm = short_ident || long_ident || sym_ident || term_var || number || string;
wenzelm@5826
   248
wenzelm@5826
   249
val term = group "term" trm;
wenzelm@5826
   250
val prop = group "proposition" trm;
wenzelm@5826
   251
wenzelm@5826
   252
wenzelm@6949
   253
(* patterns *)
wenzelm@6935
   254
wenzelm@6949
   255
val is_terms = Scan.repeat1 ($$$ "is" |-- term);
wenzelm@6935
   256
val is_props = Scan.repeat1 ($$$ "is" |-- prop);
wenzelm@6935
   257
val concl_props = $$$ "concl" |-- !!! is_props;
wenzelm@7418
   258
val any_props = concl_props >> pair [] || is_props -- Scan.optional concl_props [];
wenzelm@6935
   259
wenzelm@6935
   260
val propp = prop -- Scan.optional ($$$ "(" |-- !!! (any_props --| $$$ ")")) ([], []);
wenzelm@12047
   261
val propp' = prop -- Scan.optional ($$$ "(" |-- !!! (is_props --| $$$ ")")) [];
wenzelm@6949
   262
val termp = term -- Scan.optional ($$$ "(" |-- !!! (is_terms --| $$$ ")")) [];
wenzelm@6935
   263
wenzelm@6935
   264
wenzelm@5826
   265
(* arguments *)
wenzelm@5826
   266
wenzelm@9131
   267
fun keyword_symid is_symid = Scan.one (T.keyword_with is_symid) >> T.val_of;
wenzelm@9131
   268
val keyword_sid = keyword_symid T.is_sid;
wenzelm@5826
   269
wenzelm@6983
   270
fun atom_arg is_symid blk =
wenzelm@5826
   271
  group "argument"
wenzelm@7477
   272
    (position (short_ident || long_ident || sym_ident || term_var ||
wenzelm@5877
   273
        type_ident || type_var || number) >> Args.ident ||
wenzelm@6983
   274
      position (keyword_symid is_symid) >> Args.keyword ||
wenzelm@8350
   275
      position (string || verbatim) >> Args.string ||
wenzelm@5877
   276
      position (if blk then $$$ "," else Scan.fail) >> Args.keyword);
wenzelm@5826
   277
wenzelm@5877
   278
fun paren_args l r scan = position ($$$ l) -- !!! (scan true -- position ($$$ r))
wenzelm@5826
   279
  >> (fn (x, (ys, z)) => Args.keyword x :: ys @ [Args.keyword z]);
wenzelm@5826
   280
wenzelm@6983
   281
fun args is_symid blk x = Scan.optional (args1 is_symid blk) [] x
wenzelm@6983
   282
and args1 is_symid blk x =
wenzelm@5826
   283
  ((Scan.repeat1
wenzelm@6983
   284
    (Scan.repeat1 (atom_arg is_symid blk) ||
wenzelm@6983
   285
      paren_args "(" ")" (args is_symid) ||
wenzelm@6983
   286
      paren_args "[" "]" (args is_symid))) >> flat) x;
wenzelm@5826
   287
wenzelm@9131
   288
val arguments = args T.is_sid false;
wenzelm@9131
   289
wenzelm@5826
   290
wenzelm@6372
   291
(* theorem specifications *)
wenzelm@5826
   292
wenzelm@9131
   293
val attrib = position ((keyword_sid || xname) -- !!! arguments) >> Args.src;
wenzelm@5826
   294
val attribs = $$$ "[" |-- !!! (list attrib --| $$$ "]");
wenzelm@5826
   295
val opt_attribs = Scan.optional attribs [];
wenzelm@5826
   296
wenzelm@6398
   297
fun thm_name s = name -- opt_attribs --| $$$ s;
wenzelm@6511
   298
fun opt_thm_name s =
wenzelm@6511
   299
  Scan.optional ((name -- opt_attribs || (attribs >> pair "")) --| $$$ s) ("", []);;
wenzelm@5917
   300
wenzelm@6372
   301
val spec_name = thm_name ":" -- prop >> (fn ((x, y), z) => ((x, z), y));
wenzelm@6372
   302
val spec_opt_name = opt_thm_name ":" -- prop >> (fn ((x, y), z) => ((x, z), y));
wenzelm@6372
   303
wenzelm@5917
   304
val xthm = xname -- opt_attribs;
wenzelm@6372
   305
val xthms1 = Scan.repeat1 xthm;
wenzelm@5826
   306
wenzelm@5826
   307
wenzelm@12047
   308
(* locale elements *)
wenzelm@12047
   309
wenzelm@12272
   310
local
wenzelm@12272
   311
wenzelm@12272
   312
val loc_mixfix = $$$ "(" -- $$$ "structure" -- !!! ($$$ ")") >> K None || opt_mixfix >> Some;
wenzelm@12272
   313
val loc_keyword = $$$ "fixes" || $$$ "assumes" || $$$ "defines" || $$$ "notes" || $$$ "uses";
wenzelm@12272
   314
wenzelm@12272
   315
fun plus1 scan =
wenzelm@12272
   316
  scan -- Scan.repeat ($$$ "+" |-- Scan.unless loc_keyword (!!! scan)) >> op ::;
wenzelm@12272
   317
wenzelm@12268
   318
fun expr2 x = (xname >> Locale.Locale || $$$ "(" |-- !!! (expr0 --| $$$ ")")) x
wenzelm@12268
   319
and expr1 x = (expr2 -- Scan.repeat1 uname >> Locale.Rename || expr2) x
wenzelm@12272
   320
and expr0 x = (plus1 expr1 >> (fn [e] => e | es => Locale.Merge es)) x;
wenzelm@12268
   321
wenzelm@12272
   322
in
wenzelm@12272
   323
wenzelm@12272
   324
val locale_expr = expr0;
wenzelm@12047
   325
wenzelm@12064
   326
val locale_element = group "locale element"
wenzelm@12064
   327
  ($$$ "fixes" |-- !!! (and_list1 (name -- Scan.option ($$$ "::" |-- typ) -- loc_mixfix
wenzelm@12272
   328
    >> triple1)) >> (Locale.Elem o Locale.Fixes) ||
wenzelm@12047
   329
  $$$ "assumes" |-- !!! (and_list1 (opt_thm_name ":" -- Scan.repeat1 propp))
wenzelm@12272
   330
    >> (Locale.Elem o Locale.Assumes) ||
wenzelm@12047
   331
  $$$ "defines" |-- !!! (and_list1 (opt_thm_name ":" -- propp'))
wenzelm@12272
   332
    >> (Locale.Elem o Locale.Defines) ||
wenzelm@12272
   333
  $$$ "notes" |-- !!! (and_list1 (opt_thm_name "=" -- xthms1))
wenzelm@12272
   334
    >> (Locale.Elem o Locale.Notes) ||
wenzelm@12272
   335
  $$$ "uses" |-- !!! locale_expr >> Locale.Expr);
wenzelm@12272
   336
wenzelm@12272
   337
end;
wenzelm@12047
   338
wenzelm@12047
   339
wenzelm@5826
   340
(* proof methods *)
wenzelm@5826
   341
wenzelm@6983
   342
fun is_symid_meth s =
wenzelm@9131
   343
  s <> "|" andalso s <> "?" andalso s <> "+" andalso T.is_sid s;
wenzelm@6983
   344
wenzelm@5826
   345
fun meth4 x =
wenzelm@5877
   346
 (position (xname >> rpair []) >> (Method.Source o Args.src) ||
wenzelm@6983
   347
  $$$ "(" |-- !!! (meth0 --| $$$ ")")) x
wenzelm@5826
   348
and meth3 x =
wenzelm@5826
   349
 (meth4 --| $$$ "?" >> Method.Try ||
wenzelm@5826
   350
  meth4 --| $$$ "+" >> Method.Repeat1 ||
wenzelm@5940
   351
  meth4) x
wenzelm@5940
   352
and meth2 x =
wenzelm@6983
   353
 (position (xname -- args1 is_symid_meth false) >> (Method.Source o Args.src) ||
wenzelm@5826
   354
  meth3) x
wenzelm@5826
   355
and meth1 x = (enum1 "," meth2 >> (fn [m] => m | ms => Method.Then ms)) x
wenzelm@5826
   356
and meth0 x = (enum1 "|" meth1 >> (fn [m] => m | ms => Method.Orelse ms)) x;
wenzelm@5826
   357
wenzelm@6558
   358
val method = meth3;
wenzelm@5826
   359
wenzelm@5826
   360
wenzelm@5826
   361
end;