Skip to content
Snippets Groups Projects
Commit e928d370 authored by Hans-Peter Deifel's avatar Hans-Peter Deifel :turtle: Committed by Hans-Peter Deifel
Browse files

Improve 'verify' subcommand of main program

- Show a prompt before each input.
- Don't die if the verification of a formula fails. Show an error
  instead and accept the next input.
parent c9ed384b
No related branches found
No related tags found
No related merge requests found
......@@ -195,6 +195,7 @@ let choiceGraph () =
let choiceVerify () =
try
while true do
print_string "> ";
let input = read_line () in
if not (GenAndComp.isEmptyString input) then
let f = CoAlgFormula.importFormula input in
......@@ -202,7 +203,8 @@ let choiceVerify () =
incr counter;
print_string ("\nFormula " ^ (string_of_int !counter) ^ ": " ^ str ^ "\n");
flush stdout;
CoAlgFormula.verifyFormula f;
try CoAlgFormula.verifyFormula f;
with CoAlgFormula.CoAlgException s -> print_string (s ^ "\n")
else ()
done
with End_of_file -> ()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment