X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=ocaml%2Fparser.ml;h=f5b7d7d1173097feffd36cf74bb14dbb921cff08;hb=db562ac015ffc6c1a08c226b4eef7790b21661cd;hp=379fb2edff3697e3e8c9740909223b1d705f61b6;hpb=032edbca0cd6654adae5b5f06620723e74847435;p=fireball-separation.git diff --git a/ocaml/parser.ml b/ocaml/parser.ml index 379fb2e..f5b7d7d 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 "\n\\$") txt in + List.map problem_of_string (List.tl (List.map ((^) "$") problems)) ;;