Safe Haskell | None |
---|
Data.Prednote.Expressions
Description
Handles parsing of both infix and RPN Pdct expressions.
Documentation
Is this an infix or RPN expression?
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.