[Haskell-cafe] Operator precedence and associativity with Polyparse

Tom Hawkins tomahawkins at gmail.com
Wed Oct 26 01:49:15 CEST 2011


>> Can someone provide guidance on how handle operator precedence and
>> associativity with Polyparse?
>
> Do you mean parsing something like "1 + 2 * 3" ?  I don't think
> there's any real difference in using Polyparse vs Parsec for this,
> except for doing "p `orElse` q" rather than "try p <|> q".

Actually, I was looking for something equivalent to
Text.ParserCombinators.Parsec.Expr.buildExpressionParser.  I suppose I
should learn how Parsec implements this under the hood.

-Tom



More information about the Haskell-Cafe mailing list