Skip to content

Frontend directory ​

FrontendIdentifierImplementation
Yacc / Bison / Lramayacc-familyPackage
BNF / EBNFbnfPackage
ANTLR4antlr4Package
MenhirmenhirPackage
Peggy / PEG.jspeggyPackage

The support matrix describes their syntax boundaries. Capabilities and diagnostics remain part of every measurement.

External frontends ​

The Python BNF/EBNF reference demonstrates the executable protocol without requiring another runtime dependency beyond Python. The template repository contains a small literal-alternative parser, tests, a sample grammar, and CI. Replace its parser for your format; it is not a general BNF implementation.

Check a fixture group before using an external frontend:

sh
gramin frontend-test grammar.ext --frontend-cmd ./bin/my-frontend

This validates schema, canonical form, and capability declarations, then compares two canonical outputs for that input. It does not prove language equivalence or sandbox an external program. Add fixtures for each supported dialect, invalid input, and lossy conversion. See the frontend protocol and directory submission details.

Future format candidates include generated tree-sitter src/grammar.json, ABNF, Lark, and pest. They are not yet listed as supported implementations. Embedded source actions remain opaque; executing tree-sitter grammar.js is outside that boundary.

Structural facts for parser grammars.