A version of parseQueryList which acts on a single Text of
space-separated terms.
The usual shell quoting rules are assumed. When a pattern contains
whitespace, it (or the whole term including prefix) should be enclosed
in single or double quotes.
A query term is either:
- a search pattern, which matches on one or more fields,
eg:acct:REGEXP - match the account name with a regular expression
desc:REGEXP - match the transaction description date:PERIODEXP - match
the date with a period expression
The prefix indicates the field to match, or if there is no prefix
account name is assumed.
- a query option, which modifies the reporting behaviour in some
way. There is currently one of these, which may appear only
once:inacct:FULLACCTNAME
Period expressions may contain relative dates, so a reference date is
required to fully parse these.
>>> parseQuery nulldate "expenses:dining out"
Right (Or [Acct (RegexpCI "expenses:dining"),Acct (RegexpCI "out")],[])
>>> parseQuery nulldate "\"expenses:dining out\""
Right (Acct (RegexpCI "expenses:dining out"),[])