module AddFact where import Control.Applicative import ParserLib import AddFactDef -- addsub should parse -- E ::= natural { binop natural } -- binop ::= "+" | "-" -- Both + and - are left-associative and have the same precedence. addsub :: Parser AddSubExpr addsub = error "TODO" -- fact should parse -- E ::= natural { "!" } -- i.e., a postfix operator occuring multiple times. -- There will be spaces between consecutive !s, e.g., 4 ! !, you don't have to -- worry about 4 !! fact :: Parser FactExpr fact = error "TODO"