--- &test-A2M4
Title: Spec Example 6.2. Indentation Indicators
Tags: [ explicit-key, indent, libyaml-err, sequence, spec, upto-1.2, whitespace ]
+STR
+DOC
+MAP
=VAL :a
+SEQ
=VAL :b
+SEQ
=VAL :c
=VAL :d
-SEQ
-SEQ
-MAP
-DOC
-STR
{
"a": [
"b",
[
"c",
"d"
]
]
}
diff
Minimal Events:
+STR
+DOC
+MAP
=VAL :a
+SEQ
=VAL :b
+SEQ
=VAL :c
=VAL :d
-SEQ
-SEQ
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL :a
+SEQ
=VAL :\tb
+SEQ
=VAL :\tc
=VAL :d
-SEQ
-SEQ
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL :a
+SEQ
=VAL :\tb
+SEQ
=VAL :\tc
=VAL :d
-SEQ
-SEQ
-MAP
-DOC
-STR
json_diff
{
"a": "-\tb - -\tc - d"
}
error
+STR
+DOC
+MAP
=VAL :a
+SEQ
Parse error: found character that cannot start any token
error
yaml: line 2: found character that cannot start any token
error
luajit: 2:3: found character that cannot start any token
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/lyaml/init.lua:306: in function 'error'
/usr/local/share/lua/5.1/lyaml/init.lua:325: in function 'parse'
/usr/local/share/lua/5.1/lyaml/init.lua:443: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:393: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:378: in function 'load_node'
/usr/local/share/lua/5.1/lyaml/init.lua:497: in function 'load'
/yaml/bin/lua-lyaml-json:6: in main chunk
[C]: at 0x5639f8ff1ed0
error
YAML::PP::LibYAML Error: The problem:
found character that cannot start any token
was found at , line: 2, column: 4
while scanning for the next token at line: 2, column: 4
error
YAML::PP::LibYAML Error: The problem:
found character that cannot start any token
was found at , line: 2, column: 4
while scanning for the next token at line: 2, column: 4
error
YAML::XS::Load Error: The problem:
found character that cannot start any token
was found at document: 1, line: 2, column: 4
while scanning for the next token at line: 2, column: 4
error
YAML::XS::Load Error: The problem:
found character that cannot start any token
was found at document: 1, line: 2, column: 4
while scanning for the next token at line: 2, column: 4
error
YAML Error: Inconsistent indentation level
Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
Line: 3
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 804.
error
YAML Error: Inconsistent indentation level
Code: YAML_PARSE_ERR_INCONSISTENT_INDENTATION
Line: 3
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 804.
error
+STR
+DOC
+MAP
=VAL :a
+SEQ
Traceback (most recent call last):
File "/yaml/bin/py-pyyaml-event", line 7, in <module>
for event in yaml.parse(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 75, in parse
while loader.check_event():
^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 379, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 384, in parse_block_sequence_entry
if not self.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 2, column 4:
: - b
^
error
Traceback (most recent call last):
File "/yaml/bin/py-pyyaml-json", line 19, in <module>
for doc in yaml.load_all(sys.stdin.read(), Loader=yaml.FullLoader):
File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 130, in load_all
yield loader.get_data()
^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 45, in get_data
return self.construct_document(self.get_node())
^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 27, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 110, in compose_sequence_node
while not self.check_event(SequenceEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 379, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 384, in parse_block_sequence_entry
if not self.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 2, column 4:
: - b
^
error
Traceback (most recent call last):
File "/yaml/bin/py-pyyaml-py", line 36, in <module>
for doc in yaml.load_all(sys.stdin.read(), Loader=yaml.FullLoader):
File "/python/lib/python3.12/site-packages/yaml/__init__.py", line 130, in load_all
yield loader.get_data()
^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 45, in get_data
return self.construct_document(self.get_node())
^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 27, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 55, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 84, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 133, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 82, in compose_node
node = self.compose_sequence_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/composer.py", line 110, in compose_sequence_node
while not self.check_event(SequenceEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 379, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/parser.py", line 384, in parse_block_sequence_entry
if not self.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 258, in fetch_more_tokens
raise ScannerError("while scanning for the next token", None,
yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 2, column 4:
: - b
^
error
+STR
+DOC
+MAP
=VAL :a
+SEQ
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-event", line 9, in <module>
for event in yaml.parse(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 371, in parse
while parser.check_event():
^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 532, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 538, in parse_block_sequence_entry
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 313, in fetch_more_tokens
raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 2, column 4:
: - b
^ (line: 2)
error
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-json", line 21, in <module>
for doc in yaml.load_all(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 476, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 110, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 94, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 130, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 211, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 128, in compose_node
node = self.compose_sequence_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 172, in compose_sequence_node
while not self.parser.check_event(SequenceEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 532, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 538, in parse_block_sequence_entry
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 313, in fetch_more_tokens
raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 2, column 4:
: - b
^ (line: 2)
error
Traceback (most recent call last):
File "/yaml/bin/py-ruamel-py", line 38, in <module>
for doc in yaml.load_all(sys.stdin.read()):
File "/python/lib/python3.12/site-packages/ruamel/yaml/main.py", line 476, in load_all
yield constructor.get_data()
^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 110, in get_data
return self.construct_document(self.composer.get_node())
^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 63, in get_node
return self.compose_document()
^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 94, in compose_document
node = self.compose_node(None, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 130, in compose_node
node = self.compose_mapping_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 211, in compose_mapping_node
item_value = self.compose_node(node, item_key)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 128, in compose_node
node = self.compose_sequence_node(anchor)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 172, in compose_sequence_node
while not self.parser.check_event(SequenceEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 141, in check_event
self.current_event = self.state()
^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 532, in parse_block_sequence_first_entry
return self.parse_block_sequence_entry()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/parser.py", line 538, in parse_block_sequence_entry
if not self.scanner.check_token(BlockEntryToken, BlockEndToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 170, in check_token
self.fetch_more_tokens()
File "/python/lib/python3.12/site-packages/ruamel/yaml/scanner.py", line 313, in fetch_more_tokens
raise ScannerError(
ruamel.yaml.scanner.ScannerError: while scanning for the next token
found character '\t' that cannot start any token
in "<unicode string>", line 2, column 4:
: - b
^ (line: 2)
error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): found character that cannot start any token while scanning for the next token at line 2 column 4 (Psych::SyntaxError)
from /ruby/gems/psych/lib/psych.rb:458:in `parse_stream'
from /ruby/gems/psych/lib/psych.rb:632:in `load_stream'
from /yaml/bin/ruby-psych-json:6:in `<main>'
na
Line Col Char Byte Token|Content
1 0 0 0 +DOC |
1 0 0 0 +NODE|
1 0 0 0 +MAP |
1 0 0 0 +PAIR|
1 0 0 0 =SYNX|?
1 1 1 1 =WSPC|.
1 2 2 2 +NODE|
1 2 2 2 +VAL |
1 2 2 2 =TEXT|a
1 3 3 3 -VAL |
1 3 3 3 -NODE|
1 3 3 3 =EOL |\x0a
2 0 4 4 =SYNX|:
2 1 5 5 =DENT|.
2 2 6 6 +NODE|
2 2 6 6 +SEQ |
2 2 6 6 =SYNX|-
2 3 7 7 =WSPC|\x09
2 4 8 8 +NODE|
2 4 8 8 +VAL |
2 4 8 8 =TEXT|b
2 5 9 9 -VAL |
2 5 9 9 -NODE|
2 5 9 9 =EOL |\x0a
3 0 10 10 =DENT|..
3 2 12 12 =SYNX|-
3 3 13 13 =DENT|..
3 5 15 15 +NODE|
3 5 15 15 +SEQ |
3 5 15 15 =SYNX|-
3 6 16 16 =WSPC|\x09
3 7 17 17 +NODE|
3 7 17 17 +VAL |
3 7 17 17 =TEXT|c
3 8 18 18 -VAL |
3 8 18 18 -NODE|
3 8 18 18 =EOL |\x0a
4 0 19 19 =DENT|.....
4 5 24 24 =SYNX|-
4 6 25 25 =WSPC|.
4 7 26 26 +NODE|
4 7 26 26 +VAL |
4 7 26 26 =TEXT|d
4 8 27 27 -VAL |
4 8 27 27 -NODE|
4 8 27 27 =EOL |\x0a
5 0 28 28 -SEQ |
5 0 28 28 -NODE|
5 0 28 28 -SEQ |
5 0 28 28 -NODE|
5 0 28 28 -PAIR|
5 0 28 28 -MAP |
5 0 28 28 -NODE|
5 0 28 28 -DOC |
na
{
'a' => [
'b',
[
'c',
'd'
]
]
}
na
{
'a' => '- b - - c - d'
}
ni
YAML::Tiny does not support a feature in line '? a' at /yaml/bin/perl-tiny-json line 12.
ni
YAML::Tiny does not support a feature in line '? a' at /yaml/bin/perl-tiny-perl line 15.