A library for parsing JSON schema definitions into .gbnf
grammar files in Javascript.
npm install sql2gbnf
import SQL2GBNF from 'sql2gbnf';
const grammar = SQL2GBNF({
type: 'object',
properties: {
number: { type: 'number' },
street_name: { type: 'string' },
street_type: { enum: ['Street', 'Avenue', 'Boulevard'] },
},
});
console.log(grammar); // GBNF grammar