[Bug 25312] allow trailing commas on enums


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