(((meta (@ (content . "Formal syntax of query expressions") (name . "title"))) (meta (@ (content . "manual") (name . "role"))) (meta (@ (content . "#manual #reference #search #zettelstore") (name . "tags"))) (meta (@ (content . "zmk") (name . "syntax"))) (meta (@ (content . "00001007700000") (name . "back"))) (meta (@ (content . "00001007700000") (name . "backward"))) (meta (@ (content . "1") (name . "box-number"))) (meta (@ (content . "(c) 2020-present by Detlef Stern ") (name . "copyright"))) (meta (@ (content . "20220810144539") (name . "created"))) (meta (@ (content . "en") (name . "lang"))) (meta (@ (content . "EUPL-1.2-or-later") (name . "license"))) (meta (@ (content . "20240219155949") (name . "modified"))) (meta (@ (content . "20240219155949") (name . "published"))) (meta (@ (content . "public") (name . "visibility")))) (pre (code "QueryExpression := ZettelList? QueryDirective* SearchExpression ActionExpression?\nZettelList := (ZID (SPACE+ ZID)*).\nZID := '0'+ ('1' .. '9'') DIGIT*\n | ('1' .. '9') DIGIT*.\nQueryDirective := ContextDirective\n | IdentDirective\n | ItemsDirective\n | UnlinkedDirective.\nContextDirective := \"CONTEXT\" (SPACE+ ContextDetail)*.\nContextDetail := \"FULL\"\n | \"BACKWARD\"\n | \"FORWARD\"\n | \"COST\" SPACE+ PosInt\n | \"MAX\" SPACE+ PosInt.\nIdentDirective := IDENT.\nItemsDirective := ITEMS.\nUnlinkedDirective := UNLINKED (SPACE+ PHRASE SPACE+ Word)*.\nSearchExpression := SearchTerm (SPACE+ SearchTerm)*.\nSearchTerm := SearchOperator? SearchValue\n | SearchKey SearchOperator SearchValue?\n | SearchKey ExistOperator\n | \"OR\"\n | \"RANDOM\"\n | \"PICK\" SPACE+ PosInt\n | \"ORDER\" SPACE+ (\"REVERSE\" SPACE+)? SearchKey\n | \"OFFSET\" SPACE+ PosInt\n | \"LIMIT\" SPACE+ PosInt.\nSearchValue := Word.\nSearchKey := MetadataKey.\nSearchOperator := '!'\n | ('!')? ('~' | ':' | '[' | '}').\nExistOperator := '?'\n | '!' '?'.\nPosInt := '0'\n | ('1' .. '9') DIGIT*.\nActionExpression := '|' (Word (SPACE+ Word)*)?\nAction := Word\n | 'ATOM'\n | 'KEYS'\n | 'N' NO-SPACE*\n | 'MAX' PosInt\n | 'MIN' PosInt\n | 'REDIRECT'\n | 'REINDEX'\n | 'RSS'\n | 'TITLE' (SPACE Word)* .\nWord := NO-SPACE NO-SPACE*")))