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

Re: [WebIDL] grammar in ABNF

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 1 Jul 2009 12:18:10 +1000
To: Marcin Hanclik <Marcin.Hanclik@access-company.com>
Cc: public-webapps <public-webapps@w3.org>
Message-ID: <20090701021810.GB24402@arc.mcc.id.au>
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/
Received on Wednesday, 1 July 2009 02:18:48 UTC

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