Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (declare expr)
- (def fact
- (a/combine decimal
- (<* (*> (p-char \() expr) (p-char \)))))
- (def term
- (chainl1 fact (a/combine (<$ * (p-char \*))
- (<$ * (p-char \/)))))
- (def expr
- (chainl1 term (a/combine (<$ + (p-char \+))
- (<$ - (p-char \-)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement