Re: example 7.17 in YAML 1.2 spec 2009-07-21
Osamu TAKEUCHI <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Oren,
> On Thu, 2009-10-01 at 22:15 +0900, Osamu TAKEUCHI wrote:
>> Do you really think the following?
>>
>> {abc} is obviously { "abc" : null }
>> {abc:} is obviously { "abc" : null }
>
> Yes.
>
>> {abc::} might be read as { "abc::" : null }\
>> {abc:: a} might be read as { "abc::" <missing> "a" }
>
> No. In my rule this would be an error. I never suggested this would be
> what you show above.
>
>> I do not see how you got this idea. :(
>> Could you please explain why the last ":" character in "abc::" can
>> be read as a non indicator character?
>
> No, I can't, because I think it should be an error.
Yes, you did, to justify the error.
>> I'm fine with them. IMO interpreting a::::: as either "a::::": or
>> "a:::::" is hard to understand. Some people will "obviously" see it as
>> one, some will "obviously" see it as the other, both groups with the
>> same level of conviction. That's not readable; a readable construct has
>> only one "obvious" interpretation. And readability is our #1 goal.
I read you did think {a:::::} could be interpreted as either
{ "a::::" : null } or { "a:::::" : null } and both of
the interpretation were with the same level of conviction.
If you don't, I do not see why you want to have it as an error.
> So basically the new rule should be:
>
> /* Followed by (ns-char - c-flow-indicator) */
>
> Instead of:
>
> /* Followed by ns-char */ (originally)
> /* Followed by ns-plain-char(c) */ (my rule)
No, it is not good enough, if you really want to have the
compatibility.
Note that, out of a flow context, it has been allowed to
include indicators in a plain scalar.
- a[b}c:{:,def:]
It has to be:
/* Followed by ( ns-plain-safe(c) | "#" | ":" ) */ (my rule)
Best,
Osamu TAKEUCHI
P.S. It was not me but BlueG who pointed out the order of goals.
Please revise the errata.
> P.S. Your post did remind me I forgot to flip the order of goals #2 and
> #3, I just did that. Lets consider this a loooong September 29th ;-)
>> 1.1. Goals
>> Switched the order between goals 2 and 3 (pointed out by Osamu
>> Takeuchi).
------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf