Talk:Extended Backus–Naur form
This is the talk page for discussing improvements to the Extended Backus–Naur form article. This is not a forum for general discussion of the article's subject. |
Article policies
|
Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
Archives: 1Auto-archiving period: 30 days |
This article is rated C-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
This article is based on material taken from the Free On-line Dictionary of Computing prior to 1 November 2008 and incorporated under the "relicensing" terms of the GFDL, version 1.3 or later. |
|
|
This page has archives. Sections older than 30 days may be automatically archived by Lowercase sigmabot III. |
Who created BNF?
[edit]BNF stands for Backus-Naur form. The article states it was created by Nicklaus Wirth. I always thought it was created by two guys named Backus and Naur. —Preceding unsigned comment added by 149.32.192.33 (talk) 17:29, 8 June 2009 (UTC)
- The inventor of Backus-Naur form was John Backus. And Peter Nauer further developer and simplified it 1. Later Niklaus Wirth extended BNF to EBNF. — Preceding unsigned comment added by Msmith76 (talk • contribs) 17:15, 27 July 2020 (UTC)
repetition-symbol
[edit]Extended_Backus–Naur_Form#Conventions mentions "*" as a repetition-symbol, yet it isn't present in the grammar of EBNF itself? — Preceding unsigned comment added by 96.225.28.105 (talk) 17:53, 2 December 2015 (UTC)
- The examples (taken from the ISO document) clearly show that repetition means 0 or more, but they come long after the table. I added a comment in the table because it was indeed unclear. Nowhere man (talk) 13:26, 3 July 2023 (UTC)
EBNF correct?
[edit]Is the EBNF for EBNF correct? (Ignoring the fact that it does not mention white space, comments and other things) Specifically this bit:
lhs = identifier ; rhs = identifier | terminal | "[" , rhs , "]" | "{" , rhs , "}" | "(" , rhs , ")" | rhs , "|" , rhs | rhs , "," , rhs ; rule = lhs , "=" , rhs , ";" ; grammar = { rule } ;
The "rhs" is left recursive and leads to an infinite loop if you try to implement it how it is described. I think this corrects it:
lhs = identifier ; term = identifier | terminal | "[" , rhs , "]" | "{" , rhs , "}" | "(" , rhs , ")" rhs = term | term , "|" , rhs | term , "," , rhs ; rule = lhs , "=" , rhs , ";" ; grammar = { rule } ;
Can someone confirm this? — Preceding unsigned comment added by 92.25.123.151 (talk) 13:50, 30 January 2016 (UTC)
- I think you're almost right, though left recursion isn't inherently a bad thing. Wouldn't the identifier and terminal match before the recursive "rhs" calls could be made? I know this is years later, but I just noticed as well. I've gone in and overhauled the grammar to, I believe, correctly parse (verified with a parser generator). ZSNES (talk) 08:56, 1 March 2023 (UTC)
- I'm completely new at looking into EBNF, but the logic in the example seems strange. Is there hoisting? I would think that 'rhs' would need to be defined prior to the definition of 'term' in order for the logic to actually build upon itself. Am I missing something? 174.77.66.50 (talk) 23:29, 21 June 2023 (UTC)
I was reading through this furthur and it states the valid symbols which doesnt seem to include a `\` even though in the described grammer you have `\n` so this grammer wouldnt be able to parse itself, from what i understand. — Preceding unsigned comment added by 174.95.74.177 (talk) 14:32, 24 May 2023 (UTC)
Mistake in examples of the Conventions paragraph
[edit]The last example is "hh = (aa | bb | cc), "H"". But shouldn't this evaluate to hh: AH AAABH CH ACH AACH AAACH? And not hh: AH BH CH. BartYgor (talk) 11:34, 28 September 2023 (UTC)
Misleading term? (set disjunction)
[edit]QUOTE: "using conventions such as "-" to indicate set disjunction"
- "set difference" would be a much better term to use here in my opinion.
"set disjunction" sounds like logical disjunction, and even if one would think about "disjoint sets" it still isn't what the operation does: it does not check that sets are disjoint or not, neither it creates a disjoint set given two sets, it makes non-commutative operation - set difference Shitpoet (talk) 22:19, 18 April 2024 (UTC)
- C-Class Computer science articles
- Mid-importance Computer science articles
- WikiProject Computer science articles
- C-Class Computing articles
- Low-importance Computing articles
- C-Class software articles
- Low-importance software articles
- C-Class software articles of Low-importance
- All Software articles
- Low-importance Computer science articles
- All Computing articles
- C-Class Philosophy articles
- Low-importance Philosophy articles
- C-Class logic articles
- Low-importance logic articles
- Logic task force articles