Module
Text.Parsing.Parser.Expr
- Package
- purescript-parsing
- Repository
- purescript-contrib/purescript-parsing
#buildExprParser Source
buildExprParser :: forall a s m. Monad m => OperatorTable m s a -> ParserT s m a -> ParserT s m a
Build a parser from an OperatorTable
.
For example:
buildExprParser [ [ Infix (string "/" $> div) AssocRight ]
, [ Infix (string "*" $> mul) AssocRight ]
, [ Infix (string "-" $> sub) AssocRight ]
, [ Infix (string "+" $> add) AssocRight ]
] digit