From: Oren Ben-K. <or...@be...> - 2004-06-10 19:18:02
|
On Thursday 10 June 2004 20:50, Clark C. Evans wrote: > | My interpretation: > | > | The first line matches the l-blk-empty-line-feed(2), aka "empty > | content". Nope. In this case, n == 1 so the line does not match. How do we know n == 1? Well, the productions use the same n throughout the parsing of the block scalar, so it can't be 2 for one line and 1 for another. Obviously, to have a chance at parsing the scalar, when auto-detected, n must be at most the minimal indentation actually used, which in this case is 1. Of course, this means means the scalar _still_ doesn't parse, so its in error. This is convoluted because you are saying it in BNF; this special error case is also explicitly covered in the accompanying text, in a way that probably is a better match to how things work in a parser in practice. At any rate, I'll add an error example to the spec covering this. Have fun, Oren Ben-Kiki |