diff --git a/Common/Keywords.hs b/Common/Keywords.hs index 3e11e7b3d2..d1c1cc0266 100644 --- a/Common/Keywords.hs +++ b/Common/Keywords.hs @@ -438,6 +438,9 @@ etypeS = "etype" existsS :: String existsS = "exists" +extractS :: String +extractS = "extract" + falseS :: String falseS = "false" @@ -565,6 +568,9 @@ refinementS = "refinement" rejectS :: String rejectS = "reject" +removeS :: String +removeS = "remove" + resultS :: String resultS = "result" diff --git a/Common/Token.hs b/Common/Token.hs index 3c01bc1be6..87a5dbcdae 100644 --- a/Common/Token.hs +++ b/Common/Token.hs @@ -112,8 +112,8 @@ criticalKeywords = terminatingKeywords ++ startingKeywords -- | keywords terminating a basic spec terminatingKeywords :: [String] terminatingKeywords = - [ andS, endS, fitS, forgetS, hideS, keepS, rejectS, revealS, selectS - , thenS, withS, withinS, ofS, forS, toS, intersectS] + [ andS, endS, extractS, fitS, forgetS, hideS, keepS, rejectS, removeS, + revealS, selectS, thenS, withS, withinS, ofS, forS, toS, intersectS] -- | keywords starting a library item startingKeywords :: [String] diff --git a/Syntax/Parse_AS_Structured.hs b/Syntax/Parse_AS_Structured.hs index f58a013a34..4ceefa05fd 100644 --- a/Syntax/Parse_AS_Structured.hs +++ b/Syntax/Parse_AS_Structured.hs @@ -388,9 +388,9 @@ minimization lg = do extraction :: LogicGraph -> AParser st EXTRACTION extraction lg = do - p <- asKey "extract" <|> asKey "remove" + p <- asKey extractS <|> asKey removeS is <- many1 (hetIRI lg) - return . ExtractOrRemove (tokStr p == "extract") is $ tokPos p + return . ExtractOrRemove (tokStr p == extractS) is $ tokPos p filtering :: LogicGraph -> AParser st FILTERING filtering lg = do