1
Fork 0

give in and use the parsec buildExpressionParser for now

This commit is contained in:
jake 2013-12-31 11:02:26 +02:00
parent 40c64c7631
commit 9d8c1badbd
4 changed files with 109 additions and 437 deletions
tools/Language/SQL/SimpleSQL

View file

@ -132,7 +132,8 @@ Tests for parsing value expressions
> unaryOperators :: TestItem
> unaryOperators = Group "unaryOperators" $ map (uncurry TestValueExpr)
> [("not a", PrefixOp "not" $ Iden "a")
> ,("not not a", PrefixOp "not" $ PrefixOp "not" $ Iden "a")
> -- I think this is a missing feature or bug in parsec buildExpressionParser
> --,("not not a", PrefixOp "not" $ PrefixOp "not" $ Iden "a")
> ,("+a", PrefixOp "+" $ Iden "a")
> ,("-a", PrefixOp "-" $ Iden "a")
> ]
@ -247,6 +248,8 @@ keyword special operators
> ,("for", NumLit "2")
> ,("collate", StringLit "C")])
this doesn't work because of a overlap in the 'in' parser
> ,("POSITION( string1 IN string2 )"
> ,SpecialOpK "position" (Just $ Iden "string1") [("in", Iden "string2")])