## Re: [Yaml-core] Decision necessary!

 Re: [Yaml-core] Decision necessary! From: Clark C . Evans - 2001-12-01 23:09:53 ```| ___first____: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value ::= not [ { * & ! ' " | \ ^ @ % ] } | key ::= not # [ { * & ! ' " | \ ? : - ^ @ % ] } | series ::= not [ { * & ! ' " , ^ @ % ] } | keyed_key ::= not [ { * & ! ' " , = ^ @ % ] } | keyed_value ::= not [ { * & ! ' " , = ^ @ % ] } | | __internal__: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value ::= not | key ::= not : | series ::= not , ] | keyed_key ::= not = } | keyed_value ::= not , } I don't quite grok what the chart above shows; in particular I'm confused about the distinction between "first" and "internal". To guess, interal is [inside here?] And in this case, since we wanted to allow matrixes, etc., I don't see why you need to specify a difference. example: [this, [ "is\nnested" ], {34:'!@#\$%&*)('}, !time 12:20 ] | keyed: | this: 12:40 | that: [ 1=2, 1{3} ] | and: { 1,2 = 3=4, that = ugh! } I think this is ok. I think a few should be quoted: keyed: this: 12:40 that: [ '1=2', '1{3}' ] and: { '1,2' = '3,4', that = ugh! } | I suggest we do some serious simplification. What I'd like | to do is the following: | | ___first____: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value/key ::= not # [ { * & ! ' " | \ ? N N ^ @ % ] } | in-line ::= not # [ { * & ! ' " | \ ? , = ^ @ % ] } | | __internal__: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value/key ::= not N | in-line ::= not , = ] } | | (N)ote: I want to allow ':' and '-' everywhere as long as they are not | immediately followed by a white space character. This raises no ambiguity | and looks well in practice: I like making the mapping pair separator ": " and the sequence indicator "- ". That's cool. I still don't grok the difference bewtween first and internal. | keyed: | -12 : -12 | 12:40 : 12:40 | 12 : 40 | series: | - 12 | - -12 | - 12:40 | This works for me. Best, Clark ```

 [Yaml-core] Decision necessary! From: Oren Ben-Kiki - 2001-12-01 21:18:44 ```OK I spent some time on these pesky productions and I'm not done yet - I got really mired down along the way. The problem is the large amount of separate character sets which are allowed in the first position and in the content of an implicit leaf value, depending on its context. The following tables tell the story: ___first____: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } value ::= not [ { * & ! ' " | \ ^ @ % ] } key ::= not # [ { * & ! ' " | \ ? : - ^ @ % ] } series ::= not [ { * & ! ' " , ^ @ % ] } keyed_key ::= not [ { * & ! ' " , = ^ @ % ] } keyed_value ::= not [ { * & ! ' " , = ^ @ % ] } __internal__: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } value ::= not key ::= not : series ::= not , ] keyed_key ::= not = } keyed_value ::= not , } (The first two rows are for normal keys and values; the other three are for the in-line forms). Note the above is maximally lenient - if it isn't ambiguous, it is allowed (with the small exception that ? and : are not ambiguous if used as a first character after a property :-) Examples of what this means in practice: keyed: this: 12:40 that: [ 1=2, 1{3} ] and: { 1,2 = 3=4, that = ugh! } I don't feel comfortable with it. It is too complex to specify (trust me), remember (not to mention figure out in the first place :-)implement and read. I suggest we do some serious simplification. What I'd like to do is the following: ___first____: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } value/key ::= not # [ { * & ! ' " | \ ? N N ^ @ % ] } in-line ::= not # [ { * & ! ' " | \ ? , = ^ @ % ] } __internal__: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } value/key ::= not N in-line ::= not , = ] } (N)ote: I want to allow ':' and '-' everywhere as long as they are not immediately followed by a white space character. This raises no ambiguity and looks well in practice: keyed: -12 : -12 12:40 : 12:40 12 : 40 series: - 12 - -12 - 12:40 Even without a leading space before the ':' it looks acceptable: keyed: -12: -12 12:40: 12:40 12: 40 series: - as above The above would simplify things *a lot*. I think it would also look much better. Thoughts? I'm really drowning in productions because of this - so no new spec today... Sorry. Have fun, Oren Ben-Kiki ```
 Re: [Yaml-core] Decision necessary! From: Clark C . Evans - 2001-12-01 23:09:53 ```| ___first____: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value ::= not [ { * & ! ' " | \ ^ @ % ] } | key ::= not # [ { * & ! ' " | \ ? : - ^ @ % ] } | series ::= not [ { * & ! ' " , ^ @ % ] } | keyed_key ::= not [ { * & ! ' " , = ^ @ % ] } | keyed_value ::= not [ { * & ! ' " , = ^ @ % ] } | | __internal__: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value ::= not | key ::= not : | series ::= not , ] | keyed_key ::= not = } | keyed_value ::= not , } I don't quite grok what the chart above shows; in particular I'm confused about the distinction between "first" and "internal". To guess, interal is [inside here?] And in this case, since we wanted to allow matrixes, etc., I don't see why you need to specify a difference. example: [this, [ "is\nnested" ], {34:'!@#\$%&*)('}, !time 12:20 ] | keyed: | this: 12:40 | that: [ 1=2, 1{3} ] | and: { 1,2 = 3=4, that = ugh! } I think this is ok. I think a few should be quoted: keyed: this: 12:40 that: [ '1=2', '1{3}' ] and: { '1,2' = '3,4', that = ugh! } | I suggest we do some serious simplification. What I'd like | to do is the following: | | ___first____: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value/key ::= not # [ { * & ! ' " | \ ? N N ^ @ % ] } | in-line ::= not # [ { * & ! ' " | \ ? , = ^ @ % ] } | | __internal__: # [ { * & ! ' " | \ ? : , = - ^ @ % ] } | value/key ::= not N | in-line ::= not , = ] } | | (N)ote: I want to allow ':' and '-' everywhere as long as they are not | immediately followed by a white space character. This raises no ambiguity | and looks well in practice: I like making the mapping pair separator ": " and the sequence indicator "- ". That's cool. I still don't grok the difference bewtween first and internal. | keyed: | -12 : -12 | 12:40 : 12:40 | 12 : 40 | series: | - 12 | - -12 | - 12:40 | This works for me. Best, Clark ```
 Re: [Yaml-core] Decision necessary! From: Brian Ingerson - 2001-12-02 00:04:43 ```On 01/12/01 18:22 -0500, Clark C . Evans wrote: > | (N)ote: I want to allow ':' and '-' everywhere as long as they are not > | immediately followed by a white space character. This raises no ambiguity > | and looks well in practice: > > I like making the mapping pair separator ": " and > the sequence indicator "- ". That's cool. I agree. BTW, are we using ':' or '=' in inline maps? The examples were using both. :) > I still don't grok the difference bewtween > first and internal. I was confused by the charts as well. > | keyed: > | -12 : -12 > | 12:40 : 12:40 > | 12 : 40 > | series: > | - 12 > | - -12 > | - 12:40 > | even: keyed: -12: -12 12:40: 12:40 12: 40 which: should be the canonical emmission. > This works for me. Me too. Cheers, Brian ```