Re: ToPropertyDescriptor and [[DefineOwnProperty]], regarding Object.defineProperty

2009-06-02 Thread Jeff Walden
On 1.6.09 13:47, Allen Wirfs-Brock wrote: The main reason we needed to deal with such partial property descriptors is to enable the use case of Object.defineProperty where someone wants to set the state of some specific attribute of an already existing property. We wanted to enable a programm

JSON parser grammar

2009-06-02 Thread Oliver Hunt
So i've been looking at the JSON object grammar and have been talking to brendan and i'm getting somewhat conflicting information. The grammars on json.org and in the ES5 spec both prohibit leading 0's on any number, but the various implementations disagree with this. json2.js (from json.or

JSON parser grammar

2009-06-02 Thread Oliver Hunt
So i've been looking at the JSON object grammar and have been talking to brendan and i'm getting somewhat conflicting information. The grammars on json.org and in the ES5 spec both prohibit leading 0's on any number, but the various implementations disagree with this. json2.js (from json.or

Re: JSON parser grammar

2009-06-02 Thread Mark S. Miller
On Tue, Jun 2, 2009 at 7:06 PM, Oliver Hunt wrote: > So i've been looking at the JSON object grammar and have been talking to > brendan and i'm getting somewhat conflicting information. > > The grammars on json.org and in the ES5 spec both prohibit leading 0's on > any number, but the various imp

Re: JSON parser grammar

2009-06-02 Thread Oliver Hunt
On Jun 2, 2009, at 7:26 PM, Mark S. Miller wrote: Since octal wasn't an official part of ES3, remains absent from official ES5, and is now explicitly prohibited from ES5/strict, it is good that it is not specified by JSON. I am surprised that json2.js accepts the syntax, and even more surpri

RE: JSON parser grammar

2009-06-02 Thread Allen Wirfs-Brock
See inline >-Original Message- >From: es-discuss-boun...@mozilla.org [mailto:es-discuss- >boun...@mozilla.org] On Behalf Of Oliver Hunt >Sent: Tuesday, June 02, 2009 8:59 PM >To: Mark S.Miller >Cc: es-discuss@mozilla.org >Subject: Re: JSON parser grammar > >On Jun 2, 2009, at 7:26 PM, Mark

Re: JSON parser grammar

2009-06-02 Thread Robert Sayre
On Wed, Jun 3, 2009 at 1:27 AM, Allen Wirfs-Brock wrote: > > The intent was for the ES5 JSON grammar to exactly match the JSON RFC > grammar.  If you think it is different, then you may have found a bug so > let's make sure... It definitely doesn't match, on purpose. For example, the RFC requir

RE: JSON parser grammar

2009-06-02 Thread Allen Wirfs-Brock
>-Original Message- >From: Robert Sayre [mailto:say...@gmail.com] >Sent: Tuesday, June 02, 2009 10:33 PM >To: Allen Wirfs-Brock >Cc: Oliver Hunt; Mark S.Miller; Rob Sayre; es-discuss@mozilla.org >Subject: Re: JSON parser grammar > >On Wed, Jun 3, 2009 at 1:27 AM, Allen Wirfs-Brock > wrote:

Re: JSON parser grammar

2009-06-02 Thread Mark S. Miller
On Tue, Jun 2, 2009 at 10:56 PM, Allen Wirfs-Brock < allen.wirfs-br...@microsoft.com> wrote: > > My inclination would be to require ES5 implementation to exactly conform > the whatever JSON grammar we provide and to throw syntax errors if the input > doesn't exactly conform to the grammar. (in oth