W3C home > Mailing lists > Public > public-webapps@w3.org > July to September 2009

RE: [WebIDL] grammar in ABNF

From: Marcin Hanclik <Marcin.Hanclik@access-company.com>
Date: Wed, 1 Jul 2009 07:22:55 +0200
To: Cameron McCormack <cam@mcc.id.au>
CC: public-webapps <public-webapps@w3.org>
Message-ID: <FAA1D89C5BAF1142A74AF116630A9F2C2890AF7E40@OBEEX01.obe.access-company.com>
Hi Cameron,

>>If you can suggest some
>>specific points that need clarification, I will add some more prefatory
I had the following problem:

[45]    ScopedName      -> "::" ScopedNameAfterColon
 | identifier ScopedNameParts
Where I assumed that each ScopedName has to start with "::", because according to ABNF this production has to be written as
[45ABNF]        ScopedName      = ("::" ScopedNameAfterColon) | (identifier ScopedNameParts)

It was there with release 1.189 of the spec:

The current version 1.191 clarifies the above, i.e. the grammar is corrected as:
[52]    ScopedName      ->      AbsoluteScopedName
 | RelativeScopedName
as in

So it seems the problem that I had was corrected implicitly in version 1.190.
I am ok with the grammar now.

Anyway, I would put some reference to the syntax of the LL(1). Maybe Aho+Sethi+Ullman's book could be listed there?


Kind regards,

Marcin Hanclik
ACCESS Systems Germany GmbH
Tel: +49-208-8290-6452  |  Fax: +49-208-8290-6465
Mobile: +49-163-8290-646
E-Mail: marcin.hanclik@access-company.com

-----Original Message-----
From: Cameron McCormack [mailto:cam@mcc.id.au]
Sent: Wednesday, July 01, 2009 4:18 AM
To: Marcin Hanclik
Cc: public-webapps
Subject: Re: [WebIDL] grammar in ABNF

Hi Marcin.

Marcin Hanclik:
> Could we have the Web IDL grammar in ABNF?
> I think ABNF is quite well adopted on the market.

I think using ABNF would make the grammar harder to read, since ABNF
quoted terminals are case insensitive, and must be written out as %xHH
characters to get case insensitive treatment.

My hope is that writing the grammar out as a simple LL(1) grammar with
no special syntax for repetition or optional symbols will make it easier
for people to write an IDL parser.

> Otherwise, I think we could have more formal description of the
> grammar used in the current Web IDL spec, since it is easy now to
> misunderstand it having the ABNF syntax used in other specs.

Is it really easy to misunderstand?  ABNF syntax is quite complex
compared to the grammar syntax I am using.  The only perhaps non-obvious
parts are that quoted string terminal symbols are case sensitive and
that whitespace is allowed implicitly between every terminal symbol, but
this is explained in the text in #idl-grammar.  If you can suggest some
specific points that need clarification, I will add some more prefatory



Cameron McCormack ≝ http://mcc.id.au/


Access Systems Germany GmbH
Essener Strasse 5  |  D-46047 Oberhausen
HRB 13548 Amtsgericht Duisburg
Geschaeftsfuehrer: Michel Piquemal, Tomonori Watanabe, Yusuke Kanda


This e-mail and any attachments hereto may contain information that is privileged or confidential, and is intended for use only by the
individual or entity to which it is addressed. Any disclosure, copying or distribution of the information by anyone else is strictly prohibited.
If you have received this document in error, please notify us promptly by responding to this e-mail. Thank you.
Received on Wednesday, 1 July 2009 05:26:50 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:26:17 UTC