EBNF
Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.
EBNF/BNF Grammar Preview.
At a glance
| Purpose | A grammar written in EBNF, BNF or a related notation (W3C, ISO 14977, Yacc or Bison, PEG). |
| Extensions | .ebnf |
| Poka parser | poka-ebnf |
| Viewer | poka-metadata-card-viewer |
| Depth tier | Metadata card (see Depth tiers) |
| Breadth tier | B4 Summary (see Breadth tiers) |
How much Poka reads
B4 Summary. The container and metadata are read and summarised (counts, properties, structure), but the main content is not rendered.
Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-ebnf/src/main.rs (296 lines) and plugin.json in full. The crate has no unit tests and no tests/samples.rs, and the corpus has no .ebnf, .bnf, .grammar and .lalr sample, so the tier rests on reading the code. Covers .ebnf, .bnf, .grammar and .lalr. The output is a metadata card of counts found by matching text line by line: the detected convention, productions per convention and in total, sample production names, alternation, optional, group and repetition operators, Yacc and Bison directives, %token and %start declarations, and line counts. Judgement: B4, because the structure is summarised but the source itself is never shown.
What Poka does not read
- The source text is not shown: the card carries only counts and a few sample names, with no code view or highlighting
- Constructs are found by matching text line by line, not by parsing, so multi-line declarations, nested or indented definitions and keywords inside strings or comments can be miscounted
- Files over 32 MiB are cut to the first 32 MiB (the card says so)
- Text that is not UTF-8 is decoded with replacement characters; no other encoding is tried
- Productions are not listed as rules; only sample names and counts are shown
- The module comment names .y (Yacc), which is not routed to this module
Libraries
Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.
- ebnf (ChAoSUnItY) (candidate; MIT; Rust; https://github.com/ChAoSUnItY/ebnf) — Parses EBNF grammars; v0.1.4 (April 2023). EBNF has many dialects, so check it matches yours. Licence taken from the GitHub label.
- ebnf (MegaIng) (candidate; MIT; Python; https://github.com/MegaIng/ebnf) — Toolkit for EBNF grammars in the Lark dialect; only railroad diagrams appear implemented, conversion marked TODO.
Sources
- parsers/poka-ebnf/src/main.rs
- parsers/poka-ebnf/plugin.json