The functionality described in this section counts for extra credit.
The extended query language supported by the Moogle UI is a simple ``AND/OR'' query language. Extended MoogleMUST recognize the following syntax:
QUERY := WORD* |
QUERY "AND" QUERY |
QUERY "OR" QUERY |
"(" QUERY ")"
WORD := "[a-zA-Z0-9]+"
Note that there are only five kinds of tokens in this language:
WORDs, AND, OR, (, and ).
All tokens are WHITESPACE separated, but WHITESPACE is otherwise
discarded. PUNCTUATION is discarded. PUNCTUATION falling in the
middle of a word (e.g., hyper-cool or TF/IDF) MAY
be treated as a token separator (hyper-cool becomes
hyper and cool) or MAY be dropped and the token
parts conjoined (TF/IDF becomes TFIDF).
The semantics of this language are reasonably natural:
w1 AND w2 OR w3 AND w4
should parse as
(((w1 AND w2) OR w3) AND w4)
while
(w1 AND w2) OR (w3 AND w4)
should parse as written.
The designer MAY choose to offer additional query language syntax and functionality. For example, support for a NOT modifier or quoted phrases would be useful extensions.
Terran Lane 2005-08-23