From: Brian I. <in...@tt...> - 2002-07-15 13:00:11
|
On 15/07/02 06:54 -0400, Clark C . Evans wrote: > Brian, > > The proposal looks interesting. However, I'm trying to find > a use case where someone would want this. I can see wanting > to use flow styles at the leaves of the tree... but I can't > see going the other way around for some reason. This one may > be just over-the-top. Anyone else have opinions? I'll give this some more thought on my 5 day road trip I'm embarking on now. Plenty of time for thinking. I Like Oren's use of $. % also could work. Last night I was thinking that '%' could be used anywhere that a new block was starting. Even in those places where we currently use none: --- foo: % bar: 5 bar: % - x - y --- # same as foo: bar: 5 bar: - x - y ... Then % becomes the block node start character. And we can leave it out as an optimization. (ie Our current functionality becomes the optimization. I also reneg on the column thing. As Oren points out, tabs cause problems. And it actually doesn't look necessary. We can just increase the indent level past the current and be fine. (I think) --- foo: [bar, % bar: baz , baz] --- # same as foo: [bar, % bar: baz , baz] Think about it. I will too. Cheers, Brian > > Clark > > On Mon, Jul 15, 2002 at 05:11:37AM -0400, Oren Ben-Kiki wrote: > | Brian Ingerson [mailto:in...@tt...] wrote: > | > While suffering from heat exhaustion I had this idea. I must > | > throw it out to you. It has been pestering my mind that you > | > can switch from block to flow, but not vice versa. I have the > | > beginnings of an idea on how to do that. > | > > | > Let's say we enhance the meaning of '?' from starting a block > | > key, to simply starting a block _node_. Then we could do the > | > following: ... > | > > | > The column that the '?' is in, becomes the indentation level > | > for that block. > | > > | > Perhaps there are problems with this. That's why I'm throwing > | > it to you guys right away. > | > | It *should* work, I guess. There are nits like the use of tabs before the > | '?'. > | > | Come to think of it, these issues also occur between a '-' and the first key > | of a map_in_seq. Production [098] is in error, it allows a tab and it counts > | it wrong. I'll have to modify it to make use of the tab policy. Arrgghh. > | > | Also, what happens if one does: > | > | top: { > | key1: value, > | key2: $ > | key3: { key4: value } } > | # Note the above line closes *both* flow mappings. > | # Is it legal? > | > | I don't know about this. It gives me a headache to think about it (it is > | rather hot here as well :-). > | > | > Also, maybe instead of overloading '?', we should > | > use a different sigil. > | > | Yes, '?' had good mnemonics for a complex key, but isn't as nice for a > | general block. I'd suggest '$' (for "value"). '$' would be a space > | indicator, of course, so plain scalars would be able to start with it: > | > | > Sorry for throwing out something so large, but it at least needs to be > | > archived as have been discussed. And perhaps it's not as large as it > | seems. > | > | I suppose we *can* do it, if we insists. The question is do we *want* to do > | it. > | > | Have fun, > | > | Oren Ben-Kiki > | > | > | ------------------------------------------------------- > | This sf.net email is sponsored by:ThinkGeek > | Welcome to geek heaven. > | http://thinkgeek.com/sf > | _______________________________________________ > | Yaml-core mailing list > | Yam...@li... > | https://lists.sourceforge.net/lists/listinfo/yaml-core > > -- > Clark C. Evans Axista, Inc. > http://www.axista.com 800.926.5525 > XCOLLA Collaborative Project Management Software > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Yaml-core mailing list > Yam...@li... > https://lists.sourceforge.net/lists/listinfo/yaml-core |