diff options
Diffstat (limited to 'LogicParser.icl')
-rw-r--r-- | LogicParser.icl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/LogicParser.icl b/LogicParser.icl index b25b0e5..320e2cc 100644 --- a/LogicParser.icl +++ b/LogicParser.icl @@ -26,9 +26,12 @@ module LogicParser import StdEnv, StdMaybe, ArgEnv, Logic Start -| argc <> 1 = abort ("Usage: " +++ argv.[0] +++ " -b -nt <string>\n") -| otherwise = toString (truthtable (parse argv.[1])) +| argc < 1 = abort ("Usage: " +++ argv.[0] +++ " -b -nt <string>\n") +| extended = toString (truthtable (parse argv.[2])) +| otherwise = toString (simple_truthtable_n [parse argv.[n] \\ n <- [1..argc]]) +//| otherwise = toString ((if extended truthtable simple_truthtable) (parse argv.[1])) where argc = size argv - 1 argv = getCommandLine + extended = argv.[1] == "-e" |