From: Clark C . E. <cc...@cl...> - 2002-07-15 10:46:58
|
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? 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 |