+ | `Alias ->
+ let env = CicTextualParser2.EnvironmentP3.of_string line in
+ print_endline (CicTextualParser2.EnvironmentP3.to_string env)
+ | _ -> assert false);
+ flush stdout
+ with
+ | CicTextualParser2.Parse_error (floc, msg) ->
+ let (x, y) = CicAst.loc_of_floc floc in
+ let before = String.sub line 0 x in
+ let error = String.sub line x (y - x) in
+ let after = String.sub line y (String.length line - y) in
+ eprintf "%s\e[01;31m%s\e[00m%s\n" before error after;
+ prerr_endline (sprintf "at character %d-%d: %s" x y msg)
+ done
+ with End_of_file ->
+ close_in ic