Re: Potential typos and suggestions in the rule spec
Oren Ben-Kiki <[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <1240374362.6320.59.camel@nero> |
On Tue, 2009-04-21 at 14:30 -0700, Joshua Choi wrote:
> I'm writing a Clojure parser based on the current YAML 1.2's rule
> spec, and during my work I've run up against some apparent typos.
> While it's being finalized, I'd like to bring up these parts of the
> spec.
Great! Some pointers:
- Look at the YamlReference implementation:
http://github.com/orenbenkiki/yamlreference/tree/master
It is in Haskell but it may prove useful to you.
- Look at the work-in-progress draft:
http://github.com/yaml/yaml-spec/commits/master and
http://yaml.github.com/yaml-spec/
We have just set this github repository in the past few weeks, and the
ability to semi-automatically publish the built HTML in the past few
days (not the PDF yet - sorry). We should have announced it on the list
earlier - my bad. At any rate, anyone reviewing the spec - this is the
place to track it.
Some of the points you raises were already fixed there, the rest I fixed
today:
> Rules 155 and 166, ns-s-implicit-yaml-key and c-s-implicit-json-key,
> both end with the s-separate-in-line rule, meaning that they must end
> with separation spaces.
This was fixed in YamlReference but somehow didn't make it to the spec -
thanks for catching it! I just went through all the productions to make
doubly sure they are consistent between the reference implementation and
the spec, and fixed one other minor thing. Hopefully this is the last of
these sort of issues.
> Rule 112, s-s-double-escaped, currently says:
>
> [112] s-s-double-escaped(n) ::= s-white* "\" b-non-content
> l-empty(n,double)*
> s-line-prefix(n,c)
>
> The "double" in "l-empty(n,double)*" is probably incorrect.
Yes, this was fixed a while back. I found and fixed another place
though, where the context was incorrectly specified as "folded" instead
of block-in". Again, hopefully that's the last of that.
> ---
>
> Rule 192, l-block-map-explicit-value, should start with s-indent(n).
> Otherwise, this is invalid:
> ? Explicit key
> : Explicit value
This was fixed a while back.
> Currently, s-l+block-node must begin with separation spaces. This is
> good for within block scalars, where they must be separated from
> whatever came before them:
> - I am separated from the "-" marker.
Start-of-line is a valid "separation spaces" (see production 66).
Thanks for reviewing the spec! We are hoping to release the final formal
1.2 spec by the end of the month, so this comes at a great time.
Have fun,
Oren Ben-Kiki
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p