Extended Backus–Naur Form (EBNF)

Extended Backus-Naur form is a family of metasyntax notations, any of which can be used to express a context-free grammar. EBNF is used to make a formal description of a formal language, for example a programming language. They are extensions of the basic Backus–Naur form (BNF) metasyntax notation.

Many variants of EBNF are in use; the ISO has adopted an EBNF standard (ISO/IEC 14977). Other EBNF variants use somewhat different syntactic conventions.

A formal language is a language with a precise structure, like programming languages, data languages, or Domain Specific Languages (DSL).

A grammar can be used to define two opposite things:

  • how to recognize the different portions in a piece of code written in the formal language

  • the possible ways to build a valid piece of code in the formal language

An EBNF grammar is substantially a list of production rules. Each production rule tells us how a non-terminal can be composed

https://tomassetti.me/ebnf/ http://matt.might.net/articles/grammars-bnf-ebnf/ https://github.com/antlr/grammars-v4 https://en.wikipedia.org/wiki/Extended_Backus%E2%80%93Naur_form http://www.astorehouseofknowledge.info/w/Extended_Backus-Naur_Form http://matt.might.net/articles/grammars-bnf-ebnf/ https://tomassetti.me/parsing-in-javascript/ http://carol-nichols.com/2015/08/01/rustc-discovery/ https://github.com/log0ymxm/nom-ebnf https://github.com/jbclements/rust-antlr/

Last updated