OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office] ISO 14977 EBNF grammar

I said:
> > Yes, the lack of range operators can be worked around by using prose
> > to describe start/end sequences.

Patrick Durusau:
> Err, no, can't we define the start and end sequences in the EBNF?

No. ISO's BNF format CANNOT do that.

ISO 14977 has no range operators. That's what I tried to explain
in my first message, sorry if that wasn't clear.
Yes, you can easily specify the start and stop values in the ISO BNF format,
but since ISO BNF it has no range operator, it doesn't do any good.

> Give me something more than aesthetics...

Okay, we're back to my first email.
There is no range operator in ISO's BNF format, there _is_ one
in W3C's format, and range operators are valuable
for this kind of spec.

Look at Wikipedia's example for ISO BNF:
alphabetic character = "A" | "B" | "C" | "D" | "E" | "F" | "G"
                     | "H" | "I" | "J" | "K" | "L" | "M" | "N"
                     | "O" | "P" | "Q" | "R" | "S" | "T" | "U"
                     | "V" | "W" | "X" | "Y" | "Z" ;
Contrast this with W3C/XML BNF:
  alphabetic_character ::= [A-Z]

There are lesser reasons.  ISO's BNF spec also lacks a character
negation operator (though there's an ugly workaround for that),
and its comma-notation makes this kind of spec unnecessarily
wordy (never mind aesthetics; wordiness is not desirable for any spec).

But I think the lack of a range operator is a simple and concise rationale.

Certainly, we should use standards where we can, but the XML spec
is a standard.  And in particular, we're specifying an XML format, so using
the XML spec's notation for an XML-based format is sensible.

>Oh my! Dueling Wiki entries:

Actually, the "ISO" examples are not compliant with ISO's spec; they
are a mix of W3C and ISO formats.
IE, they use "::=" to define their productions, even though
the ISO symbol is "=" instead. It's not a good sign when even the people writing
about the ISO format use W3C-format examples.


> PS: Any more basis stuff? Not that I have time this week, I am trying to 
> finish inserting references in the draft so testing of adding 
> auto-generated content can begin.

I'm waiting for more test cases.  Once I get them, I think we can clearly
document what's going on.

--- David A. Wheeler

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]