Text.ParserCombinators.Parsec.Expr

parsec-3.1.13.0: Monadic parser combinators

Copyright | (c) Paolo Martini 2007
License | BSD-style (see the LICENSE file)
Maintainer | derek.a.elkins@gmail.com
Stability | provisional
Portability | portable
Safe Haskell | Safe
Language | Haskell2010

Text.ParserCombinators.Parsec.Expr

Description

Parsec compatibility module

Synopsis

- data Assoc
  - = AssocNone
  - | AssocLeft
  - | AssocRight
- data Operator tok st a
  - = Infix (GenParser tok st (a -> a -> a)) Assoc
  - | Prefix (GenParser tok st (a -> a))
  - | Postfix (GenParser tok st (a -> a))
- type OperatorTable tok st a = [[Operator tok st a]]
- buildExpressionParser :: OperatorTable tok st a -> GenParser tok st a -> GenParser tok st a

# Documentation

data Assoc #

This data type specifies the associativity of operators: left, right or none.

Constructors

AssocNone |
AssocLeft |
AssocRight |

data Operator tok st a #

Constructors

Infix (GenParser tok st (a -> a -> a)) Assoc |
Prefix (GenParser tok st (a -> a)) |
Postfix (GenParser tok st (a -> a)) |

type OperatorTable tok st a = [[Operator tok st a]] #

buildExpressionParser :: OperatorTable tok st a -> GenParser tok st a -> GenParser tok st a #