equal
deleted
inserted
replaced
210 val underscore = sym_ident :-- (fn "_" => Scan.succeed () | _ => Scan.fail) >> #1; |
210 val underscore = sym_ident :-- (fn "_" => Scan.succeed () | _ => Scan.fail) >> #1; |
211 fun maybe scan = underscore >> K NONE || scan >> SOME; |
211 fun maybe scan = underscore >> K NONE || scan >> SOME; |
212 |
212 |
213 val nat = number >> (#1 o Library.read_int o Symbol.explode); |
213 val nat = number >> (#1 o Library.read_int o Symbol.explode); |
214 val int = Scan.optional (minus >> K ~1) 1 -- nat >> op *; |
214 val int = Scan.optional (minus >> K ~1) 1 -- nat >> op *; |
215 val real = float_number >> (the o Real.fromString) || int >> Real.fromInt; |
215 val real = float_number >> Markup.parse_real || int >> Real.fromInt; |
216 |
216 |
217 val tag_name = group (fn () => "tag name") (short_ident || string); |
217 val tag_name = group (fn () => "tag name") (short_ident || string); |
218 val tags = Scan.repeat ($$$ "%" |-- !!! tag_name); |
218 val tags = Scan.repeat ($$$ "%" |-- !!! tag_name); |
219 |
219 |
220 val opt_unit = Scan.optional ($$$ "(" -- $$$ ")" >> (K ())) (); |
220 val opt_unit = Scan.optional ($$$ "(" -- $$$ ")" >> (K ())) (); |