gelijergensen / MetaLogic

A general purpose calculator for propositional logic systems
MIT License
0 stars 0 forks source link

Bug: Parser misinterprets named operators #9

Closed gelijergensen closed 3 years ago

gelijergensen commented 3 years ago

Consider the following three cases

λ> parseAST "(&& X Y)"
Right (AST {name = "&&", children = [AST {name = "X", children = []},AST {name = "Y", children = []}]})
λ> parseAST "(AND X Y)"
Left (line 1, column 5):
unexpected "X"
expecting )
λ> parseAST "((AND) X Y)"
Right (AST {name = "AND", children = [AST {name = "X", children = []},AST {name = "Y", children = []}]})