aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--LogicParser.icl5
1 files changed, 3 insertions, 2 deletions
diff --git a/LogicParser.icl b/LogicParser.icl
index fbf19ef..a47ffa5 100644
--- a/LogicParser.icl
+++ b/LogicParser.icl
@@ -27,12 +27,13 @@ import StdEnv, StdMaybe, ArgEnv, Logic
Start
| isEmpty exprs = abort ("Usage: " +++ argv.[0] +++ " -b -nt [-e] [-html|-latex] <string>\n")
-| otherwise = show outputoption (compute (if extended truthtable_n simple_truthtable_n (map parse exprs)))
+| length (foldr (++) [] (map all_atoms exprs)) > 8 = abort "You don't need more than 8 atomic expressions."
+| otherwise = show outputoption (compute (if extended truthtable_n simple_truthtable_n exprs))
where
argc = size argv - 1
argv = getCommandLine
- exprs = filter (\s . s.[0] <> '-') [argv.[n] \\ n <- [1..argc]]
+ exprs = map parse (filter (\s . s.[0] <> '-') [argv.[n] \\ n <- [1..argc]])
extended = hasArg "-e"
outputoption