W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2012

Re: callback interface not LL(1)

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 04 Jan 2012 14:08:56 +1100
Message-ID: <4F03C2C8.6050201@mcc.id.au>
To: Dominique Hazael-Massieux <dom@w3.org>
CC: public-script-coord@w3.org
Dominique Hazael-Massieux:
> Another case where I think the recent addition to WebIDL makes the
> grammar no longer LL(1): since "interface" is a valid value of the
> "identifier" production, "callback interface" could be parsed either as
> the starting point of:
>   callback interface foo { };
> or of:
>   callback interface = void ();

As with the similar comment for union types, if you want to name 
something "interface" you'll need to write it as "_interface":

   If the longest possible match could match both an identifier and one
   of the quoted terminal symbols from the grammar, it MUST be tokenized
   as the quoted terminal symbol. Thus, the input text “long” is
   tokenized as the quoted terminal symbol "long" rather than an
   identifier called “long”.
Received on Wednesday, 4 January 2012 03:11:56 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 May 2013 19:30:05 UTC