Advanced Searches in emplode v2.0
emplode v2.0 adds the ability to search your music database. It provides two methods of doing this: simple searches (which are hopefully so simple that I won’t explain them here), and advanced searches.
search ::= conj [or conj]* conj ::= term [and term]* term ::= item [relop item] item ::= literal | tag | "(" search ")" | not item literal ::= dquote-char (alpha|numeric|punctuation)* dquote-char | numeric+ | "true" | "false" tag ::= alpha*
Essentially, anything that appears in a *1 file is fine. We also allow the following pseudo-tags:
Some of them return time_t values, which aren’t terribly useful. We’ll come up with a way to express these for matching later.
“true” and “false” are valid values. They evaluate as you’d expect. Strings evaluate to false if empty, true otherwise.
String comparisons are case-insensitive. Tag names are case-insensitive, except for the pseudo-tags. This is a bug.