| Safe Haskell | None |
|---|
Prednote.Expressions.RPN
Description
Postfix, or RPN, expression parsing.
This module parses RPN expressions where the operands are
predicates and the operators are one of and, or, or not,
where and and or are binary and not is unary.
- data RPNToken a
- = TokOperand (Pred a)
- | TokOperator Operator
- data Operator
- pushOperand :: Pred a -> [Pred a] -> [Pred a]
- pushOperator :: Operator -> [Pred a] -> Either Text [Pred a]
- pushToken :: [Pred a] -> RPNToken a -> Either Text [Pred a]
- parseRPN :: Foldable f => f (RPNToken a) -> Either Text (Pred a)
Documentation
Constructors
| TokOperand (Pred a) | |
| TokOperator Operator |
Instances
pushOperand :: Pred a -> [Pred a] -> [Pred a]Source