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
text.

Thanks,

Cameron

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

Received on Wednesday, 1 July 2009 02:18:48 UTC