Pugs.Rule.Expr

|  | Contents | Index
Pugs.Rule.Expr |
Portability | portable
Stability | provisional
Maintainer | daan@cs.uu.nl
Description
A helper module to parse "expressions". Builds a parser given a table of operators and associativities.
Synopsis
data Assoc
= AssocNone
| AssocLeft
| AssocRight
| AssocList
| AssocChain
data Operator t st a
= Infix (GenParser t st (a -> a -> a)) Assoc
| InfixList (GenParser t st ([a] -> a)) Assoc
| Prefix (GenParser t st (a -> a))
| Postfix (GenParser t st (a -> a))
| OptionalPrefix (GenParser t st (a -> a))
type OperatorTable t st a = [[Operator t st a]]
buildExpressionParser :: OperatorTable tok st a -> GenParser tok st a -> a -> GenParser tok st a
Produced by Haddock version ADDOCK_VERSION