Talk:Extended Backus–Naur Form
From Wikipedia, the free encyclopedia
Contents |
In the article it says the http://www.cl.cam.ac.uk/~mgk25/ site has a draft version. However, as I came there, there was a link the final version. The final PDF (ISO/IEC 14977:1996) is also available via official site: http://www.iso.org/iso/en/CatalogueDetailPage.CatalogueDetail?CSNUMBER=26153
I found the pdf on the ISO site after having visited this page so am guessing it would be helpful to correct the article to point to the newly available electronic version and thus have done so. Nagoff
[edit] Restructure needed
The table of contents needs restructuring: the lead section is half the article! Most of the section should be moved down into the body of the article and slightly rewritten to fit its new location. Web-Crawling Stickler 19:24, 30 December 2006 (UTC)
[edit] No restructure needed anymore
I just revised the article and I think that the "This article or section may require restructuring to meet Wikipedia's quality standards."-tag can be removed. I don't know how to do this, maybe somebody else could do this. —Preceding unsigned comment added by Klaus trainer (talk • contribs) 00:18, 7 January 2007
- All you had to do was remove the line that said
{{Cleanup-restructure|December 2006}}
... I did it for you ... also, please sign your posts. —72.75.85.159 (talk · contribs) 01:59, 7 January 2007 (UTC)
[edit] Power
As a layman, I found something missing: I understand EBNF is as powerful as BNF, but can (E)BNF represent most or all programming languages' syntax? If not, why not? --Gwern (contribs) 01:19 22 January 2007 (GMT)
[edit] Respect the syntax, damnit!
It's just infuriating! It's an article about a syntax description language, and it's very syntax was not respected...
Nearly all examples lacked the concatenation operator, presented as an extension, whereas the only extensions proposed in ISO 14977 are the special sequence and the use of function-like syntax, as parentheses aren't allowed to follow a meta-identifier in plain EBNF...
Also, the program code given as an example of the program grammar was just plain wrong. Even if we forget just a moment that the program grammar was wrong also, at least because it lacked concatenation operators, there is no specification in it where whitespace can take place. So the valid version of the programm would probably have been:
PROGRAMDEMO1BEGINA0:=3;B:=45;H:=-100023;C:=A;D123:=B34A;BABOON:=GIRAFFE;TEXT:="Hello world!";END.
Well, no, as the grammar badly specified here didn't allow for single-char identifiers... (nor single-digit numbers, for that matters)
- I think all these observations have been corrected now. Note that digit { digit } does allow single digits, as {} means zero or more.
- The original was therefore correct, I have removed unnecessary [ ] from the example. Bobcousins 11:25, 14 November 2007 (UTC)
[edit] Syntax correction?
It looks to me like the first example in the section "Motivation to extend the BNF" is incorrectly constructed.
Should the code reading:
signed number = [ sign , ] number ;
actually be:
signed number = [ sign ] , number ;
210.15.196.66 04:17, 2 December 2007 (UTC)
Defining a production should be:
production ::= terminal | nonterminal | ... —Preceding unsigned comment added by Dncarley (talk • contribs) 14:14, 25 April 2008 (UTC)
[edit] Incorrect BNF reduction?
I do believe that the repetition is not correctly reduced to BNF:
Repetition:
number = { digit } ;
can be defined in BNF-style as:
number = digit | number digit;
I think this should rather read
number = ε | number digit;
since { digit } also includes the empty word.
141.3.27.53 (talk) 09:43, 9 January 2008 (UTC)
[edit] Using ISO EBNF consistantly
There is currently a mix of notation being used here that seem jolting, in particular a mix of ISO Extended BNF's defining symbol (=) and the notation used in earler BNF and XML's definition (::=). ISO EBNF, resolved the ambiguity between a syntactitic ('=') and meta-syntactic (=) equals-sign by requireing quotes for the former, so the double-colon notation is no longer needed. I'd like to update the article to consistently use the ISO notation, and describe the other language as "the XML specification's BNF", perhaps even moving the topic to a seperate article.
Burt Harris (talk) 17:35, 23 May 2008 (UTC)