Simple fix-expression parser
If in doubt, just use parsefix
Documentation
TokenPlain | Plain, i.e. operand |
TokenLParenth | |
TokenRParenth | |
TokenOper Fixity Integer | Operator, with fixity and precedence |
parsefix :: (t -> a, t -> t -> a, t -> t -> t -> a) -> (t -> TokenType) -> [t] -> [a]Source
Shunt and Fold