Fix several problems caused by ill-formed documents.
commitf19968770c0630e16bb5066d20031cc815dc14b9
authorxi <xi@18f92427-320e-0410-9341-c67f048884a3>
Fri, 16 Jun 2006 07:23:05 +0000 (16 07:23 +0000)
committerxi <xi@18f92427-320e-0410-9341-c67f048884a3>
Fri, 16 Jun 2006 07:23:05 +0000 (16 07:23 +0000)
treee93fa82ea8ee6590845d295acf6e520d2c622094
parent56375e650705e0cf92f4a947aaee1d8113a6af1e
Fix several problems caused by ill-formed documents.

The line number is not calculated correctly for DOS-style line breaks.

Fix error reporting in '''remove_possible_simple_key'''. The problem is caused by the document:

{{{
+foo: &A bar
+*A ]
}}}

Raise an error for a complex key which is not indented correctly, for instance:

{{{
? "foo"
 : "bar"
}}}

git-svn-id: http://svn.pyyaml.org/pyyaml/trunk@188 18f92427-320e-0410-9341-c67f048884a3
lib/yaml/reader.py
lib/yaml/scanner.py
tests/data/fetch-complex-value-bug.loader-error [new file with mode: 0644]
tests/data/remove-possible-simple-key-bug.loader-error [new file with mode: 0644]