Commit 14b8615b authored by Michael Hanus's avatar Michael Hanus
Browse files

Logic variables removed in SQLParser.parseCompHaveCond

parent 4c89825b
......@@ -11,10 +11,6 @@
module SQLParser(parseTkLs) where
import Char(toLower, toUpper)
import List(init, last, split, intercalate)
import Maybe(fromJust)
import ParseTypes
import SQLAst
......@@ -495,7 +491,7 @@ parseCompHaveCond have espm
(continue espm)
_ -> initializeSPM have espm
| otherwise = emptyTkErr espm
where follow = [RParen, (LogOp _), (SetOp _), KW_Order, KW_Limit]
where follow = logOps ++ setOps ++ [RParen, KW_Order, KW_Limit]
--Combines all parts of aggregation inside having-clause
parseAggrHave :: SPMParser (ASpecifier, ColumnRef, AstOp, Operand)
......@@ -1005,8 +1001,10 @@ parseBinOperator espm
--auxiliary definitions to build up follow sets --------------------------
setOps :: [Token]
setOps = [(SetOp Union), (SetOp Intersect), (SetOp Except)]
logOps :: [Token]
logOps = [(LogOp And), (LogOp Or)]
binOps :: [Token]
binOps = [(BinOp Lth), (BinOp Gth), (BinOp Lte), (BinOp Gte), (BinOp Equal),
(BinOp Uneq), (BinOp Like)]
\ No newline at end of file
(BinOp Uneq), (BinOp Like)]
......@@ -137,8 +137,8 @@ bindDefSPM parserA defEle f toks espm =
let resA = parserA espm
in case resA of
SPM pos (WM (Errors err) ws) tks ->
let rTks = (dropWhile (\t -> not (t `elem` toks || t== Semi)) tks)
(SPM _ pm tks2) = (f defEle (ESPM pos rTks))
let rTks = dropWhile (\t -> not (t `elem` toks || t== Semi)) tks
(SPM _ pm tks2) = f defEle (ESPM pos rTks)
in (SPM pos (combinePMs proj2 --(\ _ y -> y)
(WM (Errors err) ws)
pm)
......
......@@ -13,7 +13,7 @@ import AbstractCurry.Types
import AbstractCurry.Pretty
import AbstractCurry.Build
import Char(toLower, toUpper)
import List(intercalate, init, last, splitOn)
import List(intercalate, splitOn)
import Pretty
import ParseTypes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment