diff options
author | Camil Staps | 2015-07-03 16:54:12 +0200 |
---|---|---|
committer | Camil Staps | 2015-07-03 16:59:58 +0200 |
commit | 8141816bccdc173b8318ba9eb80043bec2d644b3 (patch) | |
tree | 1608b2fbddec92af4adb2398633799a0ccb70cd8 /Logic.dcl | |
parent | Cleanup; simple truthtable; license; readme (diff) |
Parser; cleanup
Diffstat (limited to 'Logic.dcl')
-rw-r--r-- | Logic.dcl | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -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 + |