ion7-grammar / init

module

init

Functions

json_mod.to_rules

Convert a JSON Schema to GBNF rules (as an array for Builder:merge).

json_mod.to_rules(schema, root)
schematableJSON Schema as Lua table.
rootstring?Root rule name (default: "root").
→ tableArray of { name, body } rules.
→ stringRoot rule name.

json_mod.to_gbnf

Convert a JSON Schema directly to a GBNF string.

json_mod.to_gbnf(schema, root)
schematableJSON Schema as Lua table.
rootstring?Root rule name (default: "root").
→ stringGBNF string.