PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

EBNF

EBNF

EBNF, aka extended Backus-Naur form, is a grammar language created in 1977 by Niklaus Wirth.

#427on PLDB 45Years Old 1.5kUsers
0Books 0Papers 0Repos

In computer science, extended Backus-Naur form (EBNF) 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 which can be a computer programming language. They are extensions of the basic Backus–Naur form (BNF) metasyntax notation. Read more on Wikipedia...


Example from Linguist:
(* Source: https://github.com/io7m/jsom0 License: ISC *) digit_without_zero = "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" ; digit = "0" | digit_without_zero ; positive = digit_without_zero , { digit } ; natural = "0" | positive ; real = [ "-" ] , digit , [ "." , { digit } ] ;
Example from Wikipedia:
function application = list( symbol, { expression } );

Language features

Feature Supported Example Token
Comments âś“
(* A comment
*)
MultiLine Comments âś“
(* A comment
*)
(* *)
Semantic Indentation Ď´
pic-microcontroller.html · ebnf.html · txl.html

View source

PLDB - Build the next great programming language · v2022 · Day 32 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com