Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new parser for lp files #1129

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/common/error.ml
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,5 @@ let handle_exceptions : (unit -> unit) -> unit = fun f ->
try f () with
| Fatal(None, msg) -> exit_with "%s" msg
| Fatal(Some(p), msg) -> exit_with "[%a] %s" Pos.pp p msg
| e -> exit_with "Uncaught [%s]." (Printexc.to_string e)
| e ->
exit_with "Uncaught exception: %s" (Printexc.to_string e)
4 changes: 2 additions & 2 deletions src/common/pos.ml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ let to_string : ?print_fname:bool -> pos -> string =
let popt_to_string : ?print_fname:bool -> popt -> string =
fun ?(print_fname=true) pop ->
match pop with
| None -> "Unknown location "
| Some (p) -> to_string ~print_fname p ^ " "
| None -> "Unknown location"
| Some (p) -> to_string ~print_fname p

(** [pp ppf pos] prints the optional position [pos] on [ppf]. *)
let pp : popt Lplib.Base.pp = fun ppf p ->
Expand Down
4 changes: 2 additions & 2 deletions src/handle/command.ml
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,8 @@ let get_proof_data : compiler -> sig_state -> p_command -> cmd_output =
with
| Timeout as e -> raise e
| Fatal(Some(Some(_)),_) as e -> raise e
| Fatal(None ,m) -> fatal pos "Error on command.@.%s" m
| Fatal(Some(None) ,m) -> fatal pos "Error on command.@.%s" m
| Fatal(None ,m) -> fatal pos "%s" m
| Fatal(Some(None) ,m) -> fatal pos "%s" m
| e ->
fatal pos "Uncaught exception: %s." (Printexc.to_string e)

Expand Down
2 changes: 1 addition & 1 deletion src/handle/query.ml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ let handle : Sig_state.t -> proof_state option -> p_query -> result =
let ctxt = Env.to_ctxt env in
let p = new_problem() in
match elt with
| P_query_search s -> return string (Tool.Indexing.search_cmd_txt s)
| P_query_search q -> return string (Tool.Indexing.query_results q)
| P_query_debug(_,_)
| P_query_verbose(_)
| P_query_flag(_,_)
Expand Down
Loading
Loading