Safe Haskell | None |
---|
Handles parsing of both infix and RPN Pdct expressions.
Documentation
closeParen :: Token aSource
Close parentheses
parseExpression :: ExprDesc -> [Token a] -> Exceptional Error (Pdct a)Source
Parses expressions. Fails if the expression is nonsensical in some way (for example, unbalanced parentheses, parentheses in an RPN expression, or multiple stack values remaining.) Works by first changing infix expressions to RPN ones.