You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The grammar verifier (#643) finds inputs the parser accepts and tests/grammar/grammar.pest rejects. Each is a KNOWN_DRIFT entry in src/query/datalog/parser/verifier.rs; a fix removes its entry. All are on main and v3.
Entry
Example
Parser today
UnterminatedString
"abc (end of input)
reads a string to the end
BareColon
:
the keyword :
LoneMinus
- as a value
the symbol - (pest's op_sym has no -)
EmptyQuery
(query [])
accepted
EmptyFind
(query [:find :where [?e :a ?v]])
runs, one empty row
EmptyWhere
(query [:where])
accepted
EmptyWith
[:find (count ?e) :with :where …]
accepted
UnknownKeyword
[:find ?e :foo :where …]
:foo ignored when no value follows
ResumedSection
[:find ?x :any-valid-time ?y :where …]
?y joins :find; the same after :as-of N, :valid-at "…", :max-* N
CallHead
(?r ?e) or (< ?e ?v) as a clause
read as a rule call
AggregateHead
[:find (?x ?y) :where …]
an aggregate named ?x
RuleHead
(rule [(foo ?x 1) …]), (rule [(?x ?y) …])
accepted; the grammar says a symbol then variable*
Not reached by the default bound (it needs 5 tokens): a function call named by a variable, [(?f ?x) ?y], parsed as a UDF named ?f.
Fix
Tighten the parser for v3.0.0 (a breaking change for inputs that are accepted today; each gets a PRS code), except where the grammar should change instead (LoneMinus may be better fixed by documenting - as a symbol). These change which input is accepted, so they stay on v3. Each fix can add a corpus file to tests/grammar/invalid/syntax/.
Activity
Merge pull request #659 from project-minigraf/fix/651-parser-tightening
adityamukho commentedon Oct 20, 2026
Fixed on v3 by #659 (parser tightening, PRS-109..114; KNOWN_DRIFT now empty). Docs: project-minigraf/minigraf-docs#48. Ships in v3.0.0.