Is it incorrect online version of EBNF standard, or incorrect the chapter's name by mr. Pattis?

584 views Asked by At

I am reading the EBNF: A Notation to Describe Syntax chapter by mr. Richard E. Pattis. His material is very useful and clear for me. But before it I read the ISO/IEC 14977 : 1996(E) standard... I see EBNF notations and syntax by mr. Richard E. Pattis is not the same like ones in the standard. I don't understand the reason of this...

For example, standard writes:

a) Terminal symbols of the language are quoted so that any character, including one used in Extended BNF, can be defined as a terminal symbol of the language being defined.

But mr. Pattis doesn't use the quotes in own samples. In addition, he uses unconvenient way for writting non-terminal symbols as terminal ones: for example the | char he puts into a box (it seems like a border around the char in MS Word). Usual text editors can't do it. Therefore this way is unconvenient.

Also, standard writes:

d) Each rule has an explicit final character so that there is never any ambiguity about where a rule ends.

But mr. Pattis doesn't use any final characters in own samples.

According the standard the "=" char is defining-symbol, but mr. Pattis uses the "⇐" ones instead of this.

etc

Chapter's code sample:

digit   ⇐ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
integer ⇐ [+|-]digit{digit}

For comparing: in the ISO/IEC 14977 : 1996(E) standard each digit is isolated by quotes and the semicolon is used as final character:

decimal digit = ’0’ | ’1’ | ’2’ | ’3’ | ’4’ | ’5’ | ’6’ | ’7’ | ’8’ | ’9’;

Existence of the "EBNF" word at the chapter's name confuses me... Maybe the "BNF" word must to be written instead of the "EBNF" ones at the chapter's name? Or maybe I found incorrect variant of standard?

Additional question: somebody knows the addresses of forums where I can ask my questions about the EBNF and its standard? I found nothing still...

Best regards, Andrey

1

There are 1 answers

1
Richard Pattis On

My tutorial is a first lecture that I give in my introduction to programming classes: I teach EBNF as a mini-programming language that includes named rules (like functions) and control structures (sequence, if, loop, recursion). Students learn to be language lawyers (determining whether strings match EBNF rules) and programmers (synthesizing EBNF rules from English descriptions, including positive and negative exemplars).

Therefore my goal is not to teach anyone the ISO standard, but to teach the simplest form of EBNF to absolute novices.

Rich Pattis