# Changelog

All notable changes to `eprogressing/moon-gbnf` are documented in this file.

## [0.1.1] - 2026-12-05

### Added
- `GrammarState::reset()` to reset an existing constrained decoding state back to `root` while reusing internal scratch buffers and invalidating cached masks.
- `Grammar::rule_names()` helper to retrieve ordered rule names from a parsed `Grammar`.
- `CHANGELOG.md` and live CI / `mooncakes.io` / Playground status badges in `README.md`.

## [0.1.0] - 2026-12-05

### Added
- Pure MoonBit 1.0, zero-FFI GBNF lexer, AST, recursive-descent parser, and canonical pretty-printer (`ast.mbt`, `lexer.mbt`, `parser.mbt`, `format.mbt`).
- Static validator and grammar analysis: missing `root`, duplicate/undefined/unreachable rules, fixed-point nullable rules, direct/indirect left-recursion detection, and empty-cycle detection (`validate.mbt`, `analysis.mbt`).
- Unicode scalar range normalization, complement, binary search, and flat right-recursive IR lowering (`charset.mbt`, `ir.mbt`).
- Tail-call-optimized stack-based incremental constrained decoding engine with transactional stepping, `clone()` snapshots, `allowed_ranges()`, and 128-entry ASCII bitmap + `VocabStepCache` + `StackSet` large-vocabulary masking (34.13x speedup on 32k–128k vocabularies) (`engine.mbt`, `mask.mbt`).
- Regex `pattern` → GBNF compiler (`regex.mbt`) and full JSON Schema → GBNF compiler supporting core types, objects, `additionalProperties`, arrays, `$ref`, `anyOf`/`oneOf`/`allOf`, integer `minimum`/`maximum` (including exclusive bounds), length/item bounds, and built-in formats (`json_schema.mbt`).
- Compatibility suite aligned with 8 `llama.cpp` official `.gbnf` grammars, 32k–128k benchmark runner (`bench/`), CLI subcommands (`cmd/`), zero-backend GitHub Pages browser Playground (`playground_bridge/`, `web/`), and 161-case multi-tier E2E suite (`e2e/`).
- Full verbatim Apache-2.0 (`LICENSE`, `NOTICE`) and upstream `ggml-org/llama.cpp` MIT attribution (`licenses/LICENSE-llama.cpp-MIT.txt`, `THIRD_PARTY_LICENSES.md`).
