Jul 2, 2026 Grammar-constrained decoding: forcing LLMs to output valid syntax at the token level LLMs hallucinate syntax because they sample tokens probabilistically. dsls-bounded-contextllmconstrained-generationgrammar