Summary
The quivers.dsl package docstring (the "Quick start" in src/quivers/dsl/__init__.py) shows a program that does not parse under the released grammar. It uses latent f : X -> Y and output f, but neither latent, output, nor alias are keywords in the shipped tree-sitter grammar.
Repro (quivers 0.13.0)
from quivers.dsl import loads
loads("""
object X : FinSet 3
object Y : FinSet 4
latent f : X -> Y
output f
""")
quivers.dsl.parser.ParseError: syntax error at line 4, col 0: 'latent f : X -> Y'
Cause
src/quivers/dsl/__init__.py lines ~15-22 (loads('''... latent f : X -> Y ... output f ''')).
grep -oE '"(latent|output|alias)"' src/quivers/dsl/_grammar_data/grammar.json returns nothing on main (HEAD 4fefe49) — these tokens are not in the grammar.
The real surface is program NAME : A -> B with sample / let / observe / return steps and a top-level export NAME.
Expected
The docstring example should parse. Suggest replacing it with a minimal program that compiles, e.g.:
object Resp : FinSet 8
program m : Resp -> Resp
sample b <- Normal(0.0, 5.0)
observe y : Resp <- Normal(b, 1.0)
return y
export m
Impact
First thing a user copies from the module docstring throws ParseError. Reproduces on main.
Summary
The
quivers.dslpackage docstring (the "Quick start" insrc/quivers/dsl/__init__.py) shows a program that does not parse under the released grammar. It useslatent f : X -> Yandoutput f, but neitherlatent,output, noraliasare keywords in the shipped tree-sitter grammar.Repro (quivers 0.13.0)
Cause
src/quivers/dsl/__init__.pylines ~15-22 (loads('''... latent f : X -> Y ... output f ''')).grep -oE '"(latent|output|alias)"' src/quivers/dsl/_grammar_data/grammar.jsonreturns nothing onmain(HEAD 4fefe49) — these tokens are not in the grammar.The real surface is
program NAME : A -> Bwithsample/let/observe/returnsteps and a top-levelexport NAME.Expected
The docstring example should parse. Suggest replacing it with a minimal program that compiles, e.g.:
Impact
First thing a user copies from the module docstring throws
ParseError. Reproduces onmain.