Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data Associativity
- type Holey a = [Maybe a]
- mixfixExpression :: [[(Holey (Prod r e t ident), Associativity)]] -> Prod r e t expr -> (Holey ident -> [expr] -> expr) -> Grammar r e (Prod r e t expr)
Documentation
data Associativity Source
:: [[(Holey (Prod r e t ident), Associativity)]] | A table of holey identifier parsers, with associativity information. The identifiers should be in groups of precedence levels listed from binding the least to the most tightly. The associativity is taken into account when an identifier starts or ends with a hole, or both. Internal holes (e.g. after "if" in "if_then_else_") start from the beginning of the table. |
-> Prod r e t expr | An atom, i.e. what is parsed at the lowest level. This will commonly be a (non-mixfix) identifier or a parenthesised expression. |
-> (Holey ident -> [expr] -> expr) | How to combine the successful application of a holey identifier to its arguments into an expression. |
-> Grammar r e (Prod r e t expr) |
Create a grammar for parsing mixfix expressions.