Re: example 7.17 in YAML 1.2 spec 2009-07-21

Oren Ben-Kiki <[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <1254288762.5043.41.camel@nero>
On Thu, 2009-09-03 at 03:34 +0900, Osamu TAKEUCHI wrote: 
> I noticed the example 7.17. is not reproduced by my 
> parser nor ypaste. To reproduce the result, it is required to 
> replace ( ":" followed by an ns-char ) in the the definition 
> of ns-plain-char(c) by ( ":" followed by an ns-plain-safe(c) ).

I don't see how. The example does work in ypaste. "followed by ns-char"
obviously allows _more_ than "followed by ns-plain-safe(c)". This does
not matter, since the following character is _not_ consumed by this
production, and is left to be consumed by a normal ns-plain-char
production later.

> PS 
> - Example 8.21. shows a completely deferent result.

How so?

literal: |2 
	  value
	folded:
	   !foo
	  >1
	 value

Vs.:

	%YAML 1.2
	---
	!!map {
	  ? !!str "literal"
	  : !!str "value",
	  ? !!str "folded"
	  : !<!foo> "value",
	}

Seems the same to me... If the !<!foo> is throwing you off, see "Verbatim Tags".

Have fun,

    Oren Ben-Kiki


------------------------------------------------------------------------------
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.