As a followup, I think there is production bug, as the
empty line should be...
l-blk-empty-line-feed(n) ::= i-spaces(n)? b-as-line-feed
On Thu, Jun 10, 2004 at 01:41:24PM -0400, Clark C. Evans wrote:
| On Thu, Jun 10, 2004 at 05:39:41PM +0100, pod wrote:
| | I've probably been staring at this too long but am puzzled about
| | interpretation of the (possibly invalid) YAML expression:
| | "--- |\n \n foo\n"
| | [expressed as a flow scalar since it contains embedded spaces that I want
| | to make explicitly visible].
| | The spec says "Indentation is detected from the first non-empty content
| | line". I think what my question boils down to - is the first line of the
| | scalar (" \n") considered an empty line or not?
| My interpretation:
| The first line matches the l-blk-empty-line-feed(2), aka "empty
| content". The next line matches l-literal-text(1). Since the
| indentation for the first non-empty line is different from the empty
| line, this is an "incorrect result". Therefore, the incoming text is
| a syntax error, and an explicit indentation marker |1 is required.
| Your clever example needs to be put in the specifcation,
| along with an explanation of its resolution. Thank you.
| | If it is empty then I think the document expresses "\nfoo\n" if it is not
| | empty then it is invalid. Correct?
| | Alternatively what is 'n' in the production
| | l-l-literal-chunk(n) ::= l-blk-empty-line-feed(n)*
| | ( l-literal-text(n)
| | | l-blk-empty-specific(n) )
| | when parsing "--- |\n \n foo\n"?
| Kind Regards,
| Clark C. Evans Prometheus Research, LLC
| Chief Technology Officer Turning Data Into Knowledge
| cce@... http://www.prometheusresearch.com
| (main) 203.777.2550 (cell) 203.444.0557
Clark C. Evans Prometheus Research, LLC
Chief Technology Officer Turning Data Into Knowledge
(main) 203.777.2550 (cell) 203.444.0557