Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Backus–Naur form
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
==Variants== === EBNF === {{Main|Extended Backus–Naur form}} There are many variants and extensions of BNF, generally either for the sake of simplicity and succinctness, or to adapt it to a specific application. One common feature of many variants is the use of [[regular expression]] repetition operators such as <code>*</code> and <code>+</code>. The [[extended Backus–Naur form]] (EBNF) is a common one. Another common extension is the use of square brackets around optional items. Although not present in the original ALGOL 60 report (instead introduced a few years later in [[International Business Machines|IBM]]'s [[PL/I]] definition), the notation is now universally recognised. === ABNF === {{Main|ABNF}} [[Augmented Backus–Naur form]] (ABNF) and Routing Backus–Naur form (RBNF)<ref>[http://tools.ietf.org/html/rfc5511 RBNF].</ref> are extensions commonly used to describe [[Internet Engineering Task Force]] (IETF) [[protocol (computing)|protocol]]s. [[Parsing expression grammar]]s build on the BNF and [[regular expression]] notations to form an alternative class of [[formal grammar]], which is essentially [[analytic grammar|analytic]] rather than [[generative grammar|generative]] in character. === Others === Many BNF specifications found online today are intended to be human-readable and are non-formal. These often include many of the following syntax rules and extensions: * Optional items enclosed in square brackets: <code>[<item-x>]</code>. * Items existing 0 or more times are enclosed in curly brackets or suffixed with an asterisk (<code>*</code>) such as <code><word> ::= <letter> {<letter>}</code> or <code><word> ::= <letter> <letter>*</code> respectively. * Items existing 1 or more times are suffixed with an addition (plus) symbol, <code>+</code>, such as <code><word> ::= <letter>+</code>. * Terminals may appear in bold rather than italics, and non-terminals in plain text rather than angle brackets. * Where items are grouped, they are enclosed in simple parentheses.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)