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


David,

So, I take it that the technical issue (as oppose to aesthetics, etc.) 
is the lack of support for character and negated ranges?

When you say "lack of support" I assume you mean that character and 
negative ranges are not predefined? Yes?

Which is than saying ISO/IEC 14977 cannot define character and negated 
ranges. Yes?

Err, then you say it lacks "regular expression" support? But as above, 
that is simply a question of defining the support that we want/need. Yes?

I note that the use of the XML BNF starts with Chapter 5 of the formula 
work. I would think it would be better to use a BNF to define the 
primitives up to that point so as to avoid ambiguity running up to 
Chapter 5. I don't doubt that the formula SC was far more consistent 
than previous versions of ODF but it would not hurt to use a notation 
that binds all of it together.

Hope you are having a great day!

Patrick

David A. Wheeler wrote:
> Patrick Durusau:
>   
>> The ISO EBNF grammar: 
>> http://standards.iso.org/ittf/PubliclyAvailableStandards/s026153_ISO_IEC_14977_1996(E).zip
>>     
>
> Currently, in OpenFormula we use W3C's XML spec for BNFs instead of the ISO EBNF
> or IETF BNF.
>
> The ISO spec is not a _bad_ one, but it does have weaknesses for the formula purposes.
>
> When comparing ISO's with the W3C XML spec:
> * The ISO spec has no support for character ranges and negated ranges
>   (part of regular expressions), while XML's does.
>   We use this capability; for some (like SheetName) it's not clear how hard that
>   change will be.
> * The ISO spec requires the use of "," for concatenation, instead of that
>    being the default.  It also requires ";" to terminate every production.
>    As a result, ISO's format is much wordier to express the same thing. E.G.:
>    ...  SheetLocator "." Column Row (':' SheetLocator "." Column Row )? ..
>   would become:
>    ...  SheetLocator, ".", Column, Row, (':', SheetLocator, ".", Column, Row )? .. ;
>    Not a show-stopper, but I think that's unfortunate.  Concatenation is EXTREMELY
>    common in BNF, so failing to have it as a default operator complicates the spec.
> * The ISO spec's definition operator is "=", which is easily confused with the "="
>    used inside BNFs themselves.  That's not as big a deal.
>
> Historically, the ISO document was expensive, while the XML specification was
> freely available.  I think it would have been unconscionable to have referred to the
> ISO spec while it was expensive, but now that the ISO document is publicly available
> without fee, I think it _could_ be used.  However, its lack of regular expression
> support, and unnecessary wordiness, do not give any incentives.
>
> It would take a little time to change to the ISO BNF.  To change this in OpenFormula,
> all the productions would have to change, e.g., change "::=" to "=", inserting
> commas everywhere, and trying to figure out how to replace the character ranges.
>
> Another BNF format is IETF RFC 4234.  It's kind of ugly; alternatives use "/" instead
> of the more common "|", and you HAVE to group them (which is a pain).  Even weirder,
> to indicate repetition you PRECEDE the item with "*" instead of follow it.
> Every book I've seen has "*" FOLLOW the item to be repeated.
> In my mind, IETF's is the worst of the three in terms of clarity.
>
> After looking at the W3C (XML), ISO, and IETF formats for BNFs, we chose the
> W3C's XML format. Reasons:
> * W3C's format produces the clearest, simplest specs with the same meaning.
>   Concatenation is the default, alternatives are "|", the "*" is AFTER the repeated item.
>   The resulting spec, with the same meaning, is simpler than with ISO or IETF.
> * W3C's format includes character range support.  ISO's does not.
> * OpenDocument is itself based on XML, so it made sense to use the same format
>    used to spec XML.
> * XML's format is publicly available at no charge. At the time I believe that was
>    not true of ISO's format.  It appears this point, at least, is moot (hooray!).
>
> XML is a standard, in every reasonable sense of the word, so using its BNF format
> is (in my opinion) very defensible.
>
> --- David A. Wheeler
>
> ---------------------------------------------------------------------
> To unsubscribe from this mail list, you must leave the OASIS TC that
> generates this mail.  You may a link to this group and all your TCs in OASIS
> at:
> https://www.oasis-open.org/apps/org/workgroup/portal/my_workgroups.php 
>
>
>   

-- 
Patrick Durusau
patrick@durusau.net
Chair, V1 - US TAG to JTC 1/SC 34
Convener, JTC 1/SC 34/WG 3 (Topic Maps)
Editor, OpenDocument Format TC (OASIS), Project Editor ISO/IEC 26300
Co-Editor, ISO/IEC 13250-1, 13250-5 (Topic Maps)



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