Re: [Haskell-cafe] Associative prefix operators in Parsec

2012-03-12 Thread Christian Maeder
Am 08.03.2012 17:16, schrieb Troels Henriksen: Christian Maeder writes: The simplest solution is to parse the prefixes yourself and do not put it into the table. (Doing the infixes "&" and "|" by hand is no big deal, too, and possibly easier then figuring out the capabilities of buildExpressi

Re: [Haskell-cafe] Associative prefix operators in Parsec

2012-03-08 Thread Troels Henriksen
Christian Maeder writes: > The simplest solution is to parse the prefixes yourself and do not put > it into the table. > > (Doing the infixes "&" and "|" by hand is no big deal, too, and > possibly easier then figuring out the capabilities of > buildExpressionParser) Is there another solution?

Re: [Haskell-cafe] Associative prefix operators in Parsec

2012-03-08 Thread Christian Maeder
The simplest solution is to parse the prefixes yourself and do not put it into the table. (Doing the infixes "&" and "|" by hand is no big deal, too, and possibly easier then figuring out the capabilities of buildExpressionParser) Cheers C. Am 07.03.2012 13:08, schrieb Troels Henriksen: Con

[Haskell-cafe] Associative prefix operators in Parsec

2012-03-07 Thread Troels Henriksen
Consider a simple language of logical expressions: > import Control.Applicative > import Text.Parsec hiding ((<|>), many) > import Text.Parsec.String > import Text.Parsec.Expr > > data Expr = Truth > | Falsity > | And Expr Expr > | Or Expr Expr > | Not Expr