I&#39;m writing a parser for a Haskell-style language, and when I need to use the same symbol for infix, prefix and postfix operators, the combinator &quot;buildExpressionParser&quot; seems not to work as intended. For example, in:<br>
<br>(1)x + y<br>(2)x +<br>(3)+ x<br><br>If I set the priority of the postfix version of &quot;+&quot; to be higher than the infix version, the parser cannot recognize (1), for it stops at the end of &quot;x +&quot;. And if the priority of postfix &quot;+&quot; is lower, Parsec complains about (2) by returning an error message which expects something after &quot;+&quot;.<br>
<br>Is there some way to get over this problem, and let me be able to still benifit from the expression mechanism in Parsec. Or should I write these stuff from scratch? Thanks.<br>