aboutsummaryrefslogtreecommitdiff
path: root/Logic.dcl
diff options
context:
space:
mode:
authorCamil Staps2015-07-03 16:54:12 +0200
committerCamil Staps2015-07-03 16:59:58 +0200
commit8141816bccdc173b8318ba9eb80043bec2d644b3 (patch)
tree1608b2fbddec92af4adb2398633799a0ccb70cd8 /Logic.dcl
parentCleanup; simple truthtable; license; readme (diff)
Parser; cleanup
Diffstat (limited to 'Logic.dcl')
-rw-r--r--Logic.dcl10
1 files changed, 6 insertions, 4 deletions
diff --git a/Logic.dcl b/Logic.dcl
index b6f3705..7e50822 100644
--- a/Logic.dcl
+++ b/Logic.dcl
@@ -65,12 +65,12 @@ instance toString Op2
instance toString Expr
instance toString TruthTable
-instance == Op1
-instance < Op1
+instance == Op1
+instance < Op1 // Maybe useful later if more unary operators are added
instance == Op2
-instance < Op2
+instance < Op2 // To sort by precedence
instance == Expr
-instance < Expr // To sort by unrigorous 'complexity'; e.g. in truthtables
+instance < Expr // To sort by unrigorous 'complexity'; e.g. in truthtables
binds_stronger :: Op2 Op2 -> Bool // True iff arg1 stronger binds than arg2
@@ -87,3 +87,5 @@ sorted_subexprs :: (Expr -> [Expr]) // Similar, but roughly sorted by co
simple_truthtable :: Expr -> TruthTable // Simple truthtable: only the atomic expression and the expression itself
truthtable :: Expr -> TruthTable // Truthtable from an expression
+parse :: String -> Expr // Parse a string into an expression
+