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,
This is a reminder.
I think this issue must be corrected in the next fix.
Actually, I feel that the next is too much complicated
as a simgle rule. But I couldn't find any better definition
for it, unless defining several new rules as I proposed in
my first post in this thread.
> s-l+block-collection(n,c) ::= ( ( 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) )
Did you find any good solution for it?
Best,
Osamu Takeuchi
Osamu TAKEUCHI wrote:
> Oren,
>
> Thanks for the update for ns-plain-xxx.
> I think the current version works well for the problem.
>
> BTW, how is it going for s-l+block-collection(n,c)?
> I'm assuming you are convinced that the current spec has a bug with it.
> Please give some response if you are not convinced.
>
> Now I think the next will be the best work around, which preserves the
> current rules as much as possible.
>
> s-l+block-collection(n,c) ::= ( ( 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) )
>
> Best,
> Osamu TAKEUCHI
>
>
> > 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
------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev