From: acondolu Date: Fri, 14 Jul 2017 18:32:20 +0000 (+0200) Subject: Fixed problems separator in parser: now it is $ X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=71f8eb7befd85ff4911658136597b41ed177ff8c;p=fireball-separation.git Fixed problems separator in parser: now it is $ A separable problem's label may start with '!', a not separable's with '?' --- diff --git a/ocaml/parser.ml b/ocaml/parser.ml index 379fb2e..726d076 100644 --- a/ocaml/parser.ml +++ b/ocaml/parser.ml @@ -182,7 +182,9 @@ prerr_endline (s); if line = "" then chr, name, div, conv, ps else let rec aux' chr line = if chr = "#" - then chr, line, div, conv, ps + then chr, name, div, conv, ps + else if chr = "$" + then "#", line, div, conv, ps else if chr = "D" then chr, name, line, conv, ps else if chr = "C" @@ -258,6 +260,6 @@ let from_file path = with End_of_file -> close_in chan in let txt = String.concat "\n" (List.rev !lines) in - let problems = Str.split (Str.regexp "\r?\n\r?\n\\#") txt in - List.map problem_of_string problems + let problems = Str.split (Str.regexp "\\$") txt in + List.map problem_of_string (List.tl (List.map ((^) "$") problems)) ;;