
25 Oct
2011
25 Oct
'11
7:49 p.m.
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