Modify

Ticket #288 (new defect)

Opened 12 months ago

Can't parse top level block scalar ("--- |\n") without indentation

Reported by: KOSEKI Kengo <koseki@…> Owned by: xi
Priority: normal Component: libyaml
Severity: normal Keywords:
Cc:

Description

libyaml can't parse example 4.21 in YAML 1.0 spec,

--- |
Usually top level nodes are not indented.
$ ./yaml-0.1.4/tests/run-parser yaml1.0-example4.21.yaml
[1] Parsing 'yaml1.0-example4.21.yaml': FAILURE (4 events)

and also example 9.3 and 9.5 in YAML 1.2 spec.

Bare
document
...
# No document
...
|
%!PS-Adobe-2.0 # Not the first line

example 9.5 (edited version numbers)

%YAML 1.1
--- |
%!PS-Adobe-2.0
...
%YAML 1.1
---
# Empty
...
$ ./yaml-0.1.4/tests/run-parser yaml1.2-example9.3.yaml
[1] Parsing 'yaml1.2-example9.3.yaml': FAILURE (4 events)
$ ./yaml-0.1.4/tests/run-parser yaml1.2-example9.5.yaml
[1] Parsing 'yaml1.2-example9.5.yaml': FAILURE (3 events)

YAML 1.1 Example 7.9 can be parsed.

---
foo
...
# Repeated end marker.
...
---
bar
# No end marker.
---
baz
...
$ ./yaml-0.1.4/tests/run-parser yaml1.1-example7.9.yaml
[1] Parsing 'yaml1.1-example7.9.yaml': SUCCESS (11 events)

But, this fails.

--- |
foo
...
# Repeated end marker.
...
---
bar
# No end marker.
---
baz
...
$ ./yaml-0.1.4/tests/run-parser yaml1.1-example7.9-edit.yaml
[1] Parsing 'yaml1.1-example7.9-edit.yaml': FAILURE (4 events)

Attachments

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as new
as The resolution will be set. Next status will be 'closed'
to The owner will be changed from xi. Next status will be 'new'
The owner will be changed from xi to anonymous. Next status will be 'assigned'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.