From: Oren Ben-K. <or...@ri...> - 2001-12-08 21:14:33
|
Clark C . Evans [mailto:cc...@cl...] wrote: > Oren this is beautyful. Blush :-) > I've given it a decent review (although > not complete) and there is only one problem. The last example > block needs to be cleaned up some. It's at yaml.org/oren-19.html > I'll be merging it with what I have promptly. Oops, I missed that one. Sorry. Attached is a corrected version. All the examples probably need some serious polishing... > | map: > | - key1: value > | - key2: \ > | long value > | - key3: > | nested: map > > One minor problem, time. If we wanted to do this, we need > to quote time. Nope: series: - key1: value - 14:30 - the above is a time - 14: 30 - the above is a map. I think that's acceptable. You already have this problem in: Here: { 14:30: 12:30 } Anyway. The rule about ':' and '-' is clear: they are indicators only if followed by a white space or a line break. BTW I looked in the productions and it doesn't require any new productions, just a small change to three productions (97, 102, 103). I included the change in the attached version. See if you like it. > I'm still do not completely understand the XML to YAML > conversion you are proposing here. Certainly it is > important... You are right, it was only half baked; it won't work well in the presence of attributes. I doubt there's a good solution (except, of course, for using the color idiom). I still think allowing the above syntax would prove useful for XML mappings, however, because XML's natural construct is the "ordered list of named maps". Have fun, Oren Ben-Kiki |