W3C home > Mailing lists > Public > public-script-coord@w3.org > April to June 2014

[Bug 25312] allow trailing commas on enums

From: <bugzilla@jessica.w3.org>
Date: Thu, 10 Apr 2014 17:52:59 +0000
To: public-script-coord@w3.org
Message-ID: <bug-25312-3890-8pGjPLH5rn@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=25312

Boris Zbarsky <bzbarsky@mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bzbarsky@mit.edu

--- Comment #1 from Boris Zbarsky <bzbarsky@mit.edu> ---
Uh.. this already works.  It was fixed in bug 17508.

Here's an example.  Say you have:

  enum Foo { "foo", }

The tokenizer sees the '{', then expects an EnumValueList.  

  EnumValueList    →    string EnumValueListComma

The tokenizer sees the string "foo", then expects EnumValueListComma.

  EnumValueListComma    → "," EnumValueListString
                          | ε

The tokenizer sees a ',', then expects EnumValueListString

  EnumValueListString    → string EnumValueListComma
                          | ε

The tokenizer doesn't see a string, but EnumValueListString is allowed to be
empty so we match all that, go back to our Enum production, see the expected
'}', and all is good.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
Received on Thursday, 10 April 2014 17:53:03 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:21 UTC