Treat missing as a duql keyword only after is
Context#
Aligning the duql grammar with its hand-written parser in dftracer-utils.
Decision#
In duql, missing is not a reserved word. It is a keyword only immediately after is. Thus missing == "x" reads a field named missing, while x is missing parses as the missing test. When grammar and parser disagree, the hand-written parser and frozen golden filters are the reference; change the grammar to match them.
Why#
The parser and golden filters already supported this behavior, but scripts/duql.lark excluded missing from NAME, so the two disagreed.
Rejected options#
Reserve missing everywhere in the parser.
Evidence#
The fix removed missing from the NAME exclusion regex, added two valid samples to tests/duql/grammar_samples.duql, and documented the rule in reference/duql.rst. The duql_grammar ctest checks the copy. The samples file needs a --- separator between groups.
Also found by searching
- duql missing word is not reserved except after is
- grammar rejects a field named missing but parser accepts it
- which parser should be the reference when grammar and implementation differ
- how should scripts/duql.lark treat the word missing