REFERENCE · QUERY
Query language
Syntax
A query combines atoms in order, alternatives with |, and parenthesized groups. Whitespace and | inside a quoted atom belong to its text.
Unicode normalization and morphology expansion apply as compile options after lexing.
query = alternative
alternative = sequence *(OWS "|" OWS sequence)
sequence = primary *(OWS primary)
primary = atom / "(" OWS alternative OWS ")"
Atom tags
A colon after n, pro, num, v, adj, det, adv, j, intj, or lit marks POS. It applies only to that atom.
A concrete global POS conflicting with an atom tag is a compile error.
Alternatives
Whitespace around | is optional. A B | C D chooses between two phrases; (A | B) C joins a grouped choice to the following atom. Groups may be nested, with at most 32 complete paths.
Escape or quote literal |, (, and ). Quote the whole query in a CLI shell.
Syntax errors
Empty queries, unclosed quotes, trailing backslashes, unknown tags, empty tagged bodies, operand-free |, empty groups, and unmatched parentheses are rejected.
Errors include the byte location and cause. No partial plan executes.