--- &test-W42U
Title: Spec Example 8.15. Block Sequence Entry Types
Tags: [ comment, literal, sequence, spec ]
- # Empty
- |
block node
- - one # Compact
- two # sequence
- one: two # Compact mapping
+STR
+DOC
+SEQ
=VAL :
=VAL |block node\n
+SEQ
=VAL :one
=VAL :two
-SEQ
+MAP
=VAL :one
=VAL :two
-MAP
-SEQ
-DOC
-STR
[
null,
"block node\n",
[
"one",
"two"
],
{
"one": "two"
}
]
json_diff
[
{},
"block node\n",
[
"one",
"two"
],
{
"one": "two"
}
]
json_diff
[
"",
"block node\n",
[
"one",
"two"
],
{
"one": "two"
}
]
error
YAML::Tiny found illegal characters in plain scalar: '- one # Compact' at /yaml/bin/perl-tiny-json line 12.
error
YAML::Tiny found illegal characters in plain scalar: '- one # Compact' at /yaml/bin/perl-tiny-perl line 15.
na
Line Col Char Byte Token|Content
1 0 0 0 +DOC |
1 0 0 0 +NODE|
1 0 0 0 +SEQ |
1 0 0 0 =SYNX|-
1 1 1 1 +NODE|
1 1 1 1 +VAL |
1 1 1 1 -VAL |
1 1 1 1 -NODE|
1 1 1 1 =WSPC|.
1 2 2 2 +COMM|
1 2 2 2 =SYNX|#
1 3 3 3 =META|.Empty
1 9 9 9 -COMM|
1 9 9 9 =EOL |\x0a
2 0 10 10 =SYNX|-
2 1 11 11 +NODE|
2 1 11 11 =WSPC|.
2 2 12 12 +VAL |
2 2 12 12 =SYNX||
2 3 13 13 =EOL |\x0a
3 0 14 14 =DENT|.
3 1 15 15 =TEXT|block.node
3 11 25 25 =NEWL|\x0a
4 0 26 26 -VAL |
4 0 26 26 -NODE|
4 0 26 26 =SYNX|-
4 1 27 27 =DENT|.
4 2 28 28 +NODE|
4 2 28 28 +SEQ |
4 2 28 28 =SYNX|-
4 3 29 29 =WSPC|.
4 4 30 30 +NODE|
4 4 30 30 +VAL |
4 4 30 30 =TEXT|one
4 7 33 33 -VAL |
4 7 33 33 -NODE|
4 7 33 33 =WSPC|.
4 8 34 34 +COMM|
4 8 34 34 =SYNX|#
4 9 35 35 =META|.Compact
4 17 43 43 -COMM|
4 17 43 43 =EOL |\x0a
5 0 44 44 =DENT|..
5 2 46 46 =SYNX|-
5 3 47 47 =WSPC|.
5 4 48 48 +NODE|
5 4 48 48 +VAL |
5 4 48 48 =TEXT|two
5 7 51 51 -VAL |
5 7 51 51 -NODE|
5 7 51 51 =WSPC|.
5 8 52 52 +COMM|
5 8 52 52 =SYNX|#
5 9 53 53 =META|.sequence
5 18 62 62 -COMM|
5 18 62 62 =EOL |\x0a
6 0 63 63 -SEQ |
6 0 63 63 -NODE|
6 0 63 63 =SYNX|-
6 1 64 64 =DENT|.
6 2 65 65 +NODE|
6 2 65 65 +MAP |
6 2 65 65 +PAIR|
6 2 65 65 +NODE|
6 2 65 65 +VAL |
6 2 65 65 =TEXT|one
6 5 68 68 -VAL |
6 5 68 68 -NODE|
6 5 68 68 =SYNX|:
6 6 69 69 =WSPC|.
6 7 70 70 +NODE|
6 7 70 70 +VAL |
6 7 70 70 =TEXT|two
6 10 73 73 -VAL |
6 10 73 73 -NODE|
6 10 73 73 =WSPC|.
6 11 74 74 +COMM|
6 11 74 74 =SYNX|#
6 12 75 75 =META|.Compact.mapping
6 28 91 91 -COMM|
6 28 91 91 =EOL |\x0a
7 0 92 92 -PAIR|
7 0 92 92 -MAP |
7 0 92 92 -NODE|
7 0 92 92 -SEQ |
7 0 92 92 -NODE|
7 0 92 92 -DOC |
na
[
undef,
'block node
',
[
'one',
'two'
],
{
'one' => 'two'
}
]
na
[
undef,
'block node
',
[
'one',
'two'
],
{
'one' => 'two'
}
]
na
[
undef,
'block node
',
[
'one',
'two'
],
{
'one' => 'two'
}
]
na
[
undef,
'block node
',
[
'one',
'two'
],
{
'one' => 'two'
}
]
na
[
'',
'block node
',
[
'one',
'two'
],
{
'one' => 'two'
}
]
na
[None, 'block node\n', ['one', 'two'], {'one': 'two'}]
na
[None, 'block node\n', ['one', 'two'], {'one': 'two'}]