A CommitQuery MUST parse according to the following ASCII grammar:
query ::= term (("|" | "&" | "-") term)*
term ::= "(" query ")"
| "rev" "(" rev-expr ")"
| "results" "(" effect-name "," status ")"
| "meta" "(" ref-glob ")"
status ::= "pass" | "fail" | "error" | "any"
| MUST denote union, & MUST denote intersection, and - MUST denote
difference (<<query.set-ops>>).
The binary operators MUST be left-associative and MUST share a single
precedence level; parentheses are the only way to override left-to-right
evaluation order.
rev-expr, effect-name, and ref-glob are opaque terminal strings whose
own syntax is defined by <<query.rev>>, <<effect.definition>>, and
<<query.meta>> respectively, not by this grammar.