update query parser's prefix list

This commit is contained in:
Simon Michael 2012-05-29 17:02:18 +00:00
parent e0d2530ff5
commit a5b3f072b4

View File

@ -132,13 +132,7 @@ tests_parseQuery = [
parseQuery d "\"" `is` (Acct "\"", []) parseQuery d "\"" `is` (Acct "\"", [])
] ]
-- keep synced with patterns below, excluding "not" -- XXX
prefixes = map (++":") [
"inacct","inacctonly",
"desc","acct","date","edate","status","real","empty","depth"
]
defaultprefix = "acct"
-- | Quote-and-prefix-aware version of words - don't split on spaces which -- | Quote-and-prefix-aware version of words - don't split on spaces which
-- are inside quotes, including quotes which may have one of the specified -- are inside quotes, including quotes which may have one of the specified
-- prefixes in front, and maybe an additional not: prefix in front of that. -- prefixes in front, and maybe an additional not: prefix in front of that.
@ -172,6 +166,24 @@ tests_words'' = [
"\"" `gives` ["\""] "\"" `gives` ["\""]
] ]
-- XXX
-- keep synced with patterns below, excluding "not"
prefixes = map (++":") [
"inacctonly"
,"inacct"
,"desc"
,"acct"
,"date"
,"edate"
,"status"
,"real"
,"empty"
,"depth"
,"tag"
]
defaultprefix = "acct"
-- -- | Parse the query string as a boolean tree of match patterns. -- -- | Parse the query string as a boolean tree of match patterns.
-- parseQueryTerm :: String -> Query -- parseQueryTerm :: String -> Query
-- parseQueryTerm s = either (const (Any)) id $ runParser query () "" $ lexmatcher s -- parseQueryTerm s = either (const (Any)) id $ runParser query () "" $ lexmatcher s