W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

[Bug 17508] Let enum lists end with a comma

From: <bugzilla@jessica.w3.org>
Date: Mon, 05 Aug 2013 06:25:27 +0000
To: public-script-coord@w3.org
Message-ID: <bug-17508-3890-wV80FvGUeI@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17508

--- Comment #10 from Nils Barth <nbarth+w3bugzilla@google.com> ---
(In reply to comment #9)
> (In reply to comment #8)
> > ...though we could instead use these 3 rules, which seem a bit simpler:
> > Enum          → "enum" identifier "{" EnumValueList "}" ";"
> > EnumValueList → string EnumValues
> > EnumValues    → "," string EnumValues
> >                 | ","
> >                 | ε
> > 
> > WDYT?
> 
> That's not LL(1), since you can't decide which of the first two productions
> of EnumValues to take without looking ahead another token.  I'd like to keep
> the language LL(1) to make it easy to write a parser for.

Got it, thanks for the explanation!
Right, it's LL(2); been using LALR parser so didn't notice.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Monday, 5 August 2013 06:25:57 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC