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

EBNF

< >

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

#462on PLDB 46Years 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 Token Example
Comments âś“
(* A comment
*)
MultiLine Comments âś“ (* *)
(* A comment
*)
Semantic Indentation X
microsoft-small-basic.html · ebnf.html · hexagon.html

View source

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