Re: Example 6.23 and 6.24 in YAML 1.2 spec dated 2009-07-21
Osamu TAKEUCHI <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <[email protected]> |
Oren,
>> On Wed, 2009-09-30 at 15:08 +0900, Osamu TAKEUCHI wrote:
>>> If you think the current spec accepts the example 6.23 and 6.24,
>>> please clarify how.
>> It does since YamlReference works :-)
>
> Fmm, can I check the source code for the YamlReference anywhere?
> I couldn't find it. Probably I'm overlooking.
Oops, I really overlooked it.
It was so obvious. :(
Ok, I found the reason why YamlReference works correctly.
> s_l__block_collection n c {- 200 -} = ( s_separate (n .+ 1) c & c_ns_properties (n .+ 1) c & ( s_l_comments >?) ?)
> & s_l_comments
> & ( l__block_sequence (seq_spaces n c)
> / l__block_mapping n )
I'm not good at Haskell but this seems the key.
>> & ( s_l_comments >?)
I very much dislike this.
But, meanwhile, it can be an ugly work around to have the rule [200] as:
s-l+block-collection(n,c) ::= ( s-separate(n+1,c) c-ns-properties(n+1,c) /* followed by s_l_comments */ )?
s-l-comments
( l+block-sequence(seq-spaces(n,c))
| l+block-mapping(n) )
Best,
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