aboutsummaryrefslogtreecommitdiff
path: root/LogicParser.icl
diff options
context:
space:
mode:
authorCamil Staps2016-08-01 09:37:26 +0200
committerCamil Staps2016-08-01 09:37:26 +0200
commitad5ada9d161c6bb27b3201b31ece36479c1ff98d (patch)
tree61705dc04a2641cfad98b6fbc4be2c4a13b11d45 /LogicParser.icl
parentFixed issue where truth tables had too many options (diff)
Cleanup & fix #1
Diffstat (limited to 'LogicParser.icl')
-rw-r--r--LogicParser.icl19
1 files changed, 9 insertions, 10 deletions
diff --git a/LogicParser.icl b/LogicParser.icl
index ab99abf..46ac605 100644
--- a/LogicParser.icl
+++ b/LogicParser.icl
@@ -30,15 +30,14 @@ Start
| length (removeDup (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
+ argc = size argv - 1
+ argv = getCommandLine
- exprs = map parse (filter (\s . s.[0] <> '-') [argv.[n] \\ n <- [1..argc]])
-
- extended = hasArg "-e"
- outputoption
- | hasArg "-html" = Html
- | hasArg "-latex" = LaTeX
- | otherwise = Plain
- hasArg arg = or [arg == argv.[n] \\ n <- [0..argc]]
+ exprs = map parse (filter (\s . s.[0] <> '-') [argv.[n] \\ n <- [1..argc]])
+ extended = hasArg "-e"
+ outputoption
+ | hasArg "-html" = Html
+ | hasArg "-latex" = LaTeX
+ | otherwise = Plain
+ hasArg arg = or [arg == argv.[n] \\ n <- [0..argc]]