$ luarocks install ion7-grammarCompile regex, ABNF (RFC 5234), W3C-style EBNF, JSON Schema, or Lua type annotations to GBNF, then constrain LLMs to valid output by construction.
Includes a stateful GrammarContext, a per-seq KV-rollback Backtrack runtime (IterGen / CRANE), DCCD (Draft-Conditioned Constrained Decoding, arXiv:2603.03305), a pure-Lua fuzzer, and grammar diff / inspect / tree helpers.
Multi-tenant safe : Backtrack and DCCD operate on a single seq id so they drop into ion7-llm's Pool without disturbing other sessions.
Versions
Dependencies
ion7-core >= 0.1.0beta4
LPeg >= 1.0
lua >= 5.1