From: Brian I. <in...@tt...> - 2003-02-14 16:50:39
|
I'm not really comfortable with the way we are defining sequence indentation. (the dash counts as indentation) For starters, this: --- foo: - one - two: three ... is not valid, when it most obviously should be. I say obvious, as in the general layman, not obvious as in those who made up the rules. Basically it boils down to: "Making the dash part of the indentation was a quick and dirty way to explain the behaviour of putting sequences directly below the map keys." It may keep the productions easy, but it doesn't really play out well with human interaction. What does this mean: --- - |2 tic tac toe ... One leading space per line or two? Again I'm not asking for clarification, but rather, what *should* it mean. If I tell my emitter to use 2-column indenting, do I get: --- foo: - bar --- foo: - bar --- - bar ... The first and the third ones will look the best in a large data dump. But the second one is pedantically correct. What's a dumper to do? The most correct solution (IMO) is to not count the dash as indentation, and to make seq_in_map a special case. Oren, is this possible for the productions? Cheers, Brian |
From: Oren Ben-K. <or...@be...> - 2003-02-23 22:41:25
|
Brian Ingerson wrote: > I'm not really comfortable with the way we are defining > sequence indentation. (the dash counts as indentation) For > starters, this: > > --- > foo: > - one > - > two: three > ... > > is not valid, when it most obviously should be. I say > obvious, as in the general layman, not obvious as in those > who made up the rules. :-) The problem is with the incorrect (too general) wording. It restricted to the *-in-seq case only. It is NOT true otherwise. > Basically it boils down to: "Making the dash part of the > indentation was a quick and dirty way to explain the > behaviour of putting sequences directly below the map keys." Right. > What does this mean: > > --- > - |2 > tic > tac > toe > ... > > One leading space per line or two? Again I'm not asking for > clarification, but rather, what *should* it mean. 2 leading spaces. This is both a clarification and what it should mean :-) > If I tell my emitter to use 2-column indenting, do I get: Well, that really depends how you write it, but I expect the answer to be: > --- > foo: > - bar > --- > Oren, is this possible for the productions? Well, here's the thing - it is already there :-) The only problem is the incorrect wording, which should be fixed. Nice catch! Have fun, Oren Ben-Kiki |
From: Clark C. E. <cc...@cl...> - 2003-02-26 05:18:16
|
On Mon, Feb 24, 2003 at 12:40:57AM +0200, Oren Ben-Kiki wrote: | Brian Ingerson wrote: | > I'm not really comfortable with the way we are defining | > sequence indentation. (the dash counts as indentation) For | > starters, this: | > | > --- | > foo: | > - one | > - | > two: three | > ... | > | > is not valid, when it most obviously should be. Agreed. Clark |
From: Oren Ben-K. <or...@be...> - 2003-02-26 23:02:00
|
Clark C. Evans wrote: > | > --- > | > foo: > | > - one > | > - > | > two: three > | > ... > | > > | > is not valid, when it most obviously should be. > > Agreed. But it is valid (according to the productions at least). It is just a bug in the wording that implies it isn't. Have fun, Oren Ben-Kiki |