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.


> Note that s-l-comments will match the start of a line.
> Also, ( ... )? is an atomic match, so if it fails anywhere inside, it is
> as if it has never been attempted.

They do not seem to be related for me.

Let's assume the next input.

!tag foo :
  baz

I think this should be accepted by s-l+block-collection(-1, block-in).

s-l+block-collection(-1,block-in) ::= ( s-separate(0,block-in) c-ns-properties(0,block-in) )?
                              s-l-comments
                              ( l+block-sequence(seq-spaces(-1,block-in))
                                | l+block-mapping(-1) ) 

The problem is that the optional part 
"s-separate(0,block-in) c-ns-properties(0,block-in)" DOES NOT fail to match.
Note that s-separate(0,block-in) can match the start of a line and 
c-ns-properties(0,block-in) can match "!tag".

Then, s-l-comments fails to match the rest of the document because we are
no more at the start of line.

So, the whole s-l+block-collection(-1,block-in) fails to match.

What can be my misunderstanding?

Best,
Osamu TAKEUCHI

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.