--- &test-2SXE
Title: Anchors With Colon in Name
Tags: [ 1.3-err, alias, edge, mapping ]
&a: key: &a value
foo:
*a:
+STR
+DOC
+MAP
=VAL &a: :key
=VAL &a :value
=VAL :foo
=ALI *a:
-MAP
-DOC
-STR
{
"foo": "key",
"key": "value"
}
diff
Minimal Events:
+STR
+DOC
+MAP
=VAL &a: :key
=VAL &a :value
=VAL :foo
=ALI *a:
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
+MAP
=VAL &a: :key
=VAL &a :value
=VAL :foo
+MAP
=ALI *a
=VAL :
-MAP
-MAP
-DOC
-STR
Got Events:
+STR
+DOC
+MAP
=VAL &a: :key
=VAL &a :value
=VAL :foo
+MAP
=ALI *a
=VAL :
-MAP
-MAP
-DOC
-STR
json_diff
{
"": "key: &a value",
"foo": {
"": null
}
}
error
+STR
+DOC
+MAP
=VAL &a :
=VAL :key
Parse error: mapping values are not allowed in this context
error
yaml: mapping values are not allowed in this context
error
/node/node_modules/js-yaml/lib/loader.js:187
throw generateError(state, message);
^
YAMLException: end of the stream or a document separator is expected (1:8)
1 | &a: key: &a value
------------^
2 | foo:
3 | *a:
at generateError (/node/node_modules/js-yaml/lib/loader.js:183:10)
at throwError (/node/node_modules/js-yaml/lib/loader.js:187:9)
at readDocument (/node/node_modules/js-yaml/lib/loader.js:1645:5)
at loadDocuments (/node/node_modules/js-yaml/lib/loader.js:1688:5)
at Object.loadAll (/node/node_modules/js-yaml/lib/loader.js:1701:19)
at Object.<anonymous> (/yaml/bin/js-jsyaml-json:7:13)
at Module._compile (node:internal/modules/cjs/loader:1358:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
at Module.load (node:internal/modules/cjs/loader:1208:32)
at Module._load (node:internal/modules/cjs/loader:1024:12) {
reason: 'end of the stream or a document separator is expected',
mark: {
name: null,
buffer: '&a: key: &a value\nfoo:\n *a:\n',
position: 7,
line: 0,
column: 7,
snippet: ' 1 | &a: key: &a value\n------------^\n 2 | foo:\n 3 | *a:'
}
}
Node.js v20.13.1
error
luajit: 1:5: mapping values are not allowed in this context
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:340: 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 0x55ab47448ed0
error
YAML::PP::LibYAML Error: The problem:
mapping values are not allowed in this context
was found at , line: 1, column: 8
error
YAML::PP::LibYAML Error: The problem:
mapping values are not allowed in this context
was found at , line: 1, column: 8
error
Syck parser (line 1, column 3): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.
error
Syck parser (line 1, column 3): syntax error at /perl5/lib/perl5/x86_64-linux-thread-multi/YAML/Syck.pm line 60, <> line 1.
error
Use of uninitialized value in subroutine entry at /yaml/bin/perl-xs-json line 14, <> line 1.
YAML::XS::Load Error: The problem:
mapping values are not allowed in this context
was found at document: 1, line: 1, column: 8
error
Use of uninitialized value in subroutine entry at /yaml/bin/perl-xs-perl line 16, <> line 1.
YAML::XS::Load Error: The problem:
mapping values are not allowed in this context
was found at document: 1, line: 1, column: 8
error
+STR
+DOC
+MAP
=VAL &a :
=VAL :key
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 428, in parse_block_mapping_key
if self.check_token(KeyToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^
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 223, in fetch_more_tokens
return self.fetch_value()
^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 577, in fetch_value
raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
in "<unicode string>", line 1, column 8:
&a: key: &a value
^
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 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 428, in parse_block_mapping_key
if self.check_token(KeyToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^
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 223, in fetch_more_tokens
return self.fetch_value()
^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 577, in fetch_value
raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
in "<unicode string>", line 1, column 8:
&a: key: &a value
^
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 127, in compose_mapping_node
while not self.check_event(MappingEndEvent):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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 428, in parse_block_mapping_key
if self.check_token(KeyToken):
^^^^^^^^^^^^^^^^^^^^^^^^^^
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 223, in fetch_more_tokens
return self.fetch_value()
^^^^^^^^^^^^^^^^^^
File "/python/lib/python3.12/site-packages/yaml/scanner.py", line 577, in fetch_value
raise ScannerError(None, None,
yaml.scanner.ScannerError: mapping values are not allowed here
in "<unicode string>", line 1, column 8:
&a: key: &a value
^
error
/ruby/gems/psych/lib/psych.rb:458:in `parse': (<unknown>): mapping values are not allowed in this context at line 1 column 8 (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>'
error
+STR
+DOC
+MAP
=VAL &1 :
=VAL :key
Error: ScanError { mark: Marker { index: 7, line: 1, col: 7 }, info: "mapping values are not allowed in this context" }
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 +NODE|
1 0 0 0 +PROP|
1 0 0 0 +ANCH|
1 0 0 0 =SYNX|&
1 1 1 1 =META|a:
1 3 3 3 -ANCH|
1 3 3 3 -PROP|
1 3 3 3 =WSPC|.
1 4 4 4 +VAL |
1 4 4 4 =TEXT|key
1 7 7 7 -VAL |
1 7 7 7 -NODE|
1 7 7 7 =SYNX|:
1 8 8 8 =WSPC|.
1 9 9 9 +NODE|
1 9 9 9 +PROP|
1 9 9 9 +ANCH|
1 9 9 9 =SYNX|&
1 10 10 10 =META|a
1 11 11 11 -ANCH|
1 11 11 11 -PROP|
1 11 11 11 =WSPC|.
1 12 12 12 +VAL |
1 12 12 12 =TEXT|value
1 17 17 17 -VAL |
1 17 17 17 -NODE|
1 17 17 17 =EOL |\x0a
2 0 18 18 -PAIR|
2 0 18 18 +PAIR|
2 0 18 18 +NODE|
2 0 18 18 +VAL |
2 0 18 18 =TEXT|foo
2 3 21 21 -VAL |
2 3 21 21 -NODE|
2 3 21 21 =SYNX|:
2 4 22 22 =EOL |\x0a
3 0 23 23 =DENT|.
3 1 24 24 =WSPC|.
3 2 25 25 +NODE|
3 2 25 25 +ALI |
3 2 25 25 =SYNX|*
3 3 26 26 =META|a:
3 5 28 28 -ALI |
3 5 28 28 -NODE|
3 5 28 28 =EOL |\x0a
4 0 29 29 -PAIR|
4 0 29 29 -MAP |
4 0 29 29 -NODE|
4 0 29 29 -DOC |
na
{
'foo' => 'key',
'key' => 'value'
}
na
{
'' => 'key: &a value',
'foo' => {
'' => undef
}
}
na
{'foo': 'key', 'key': 'value'}
ni
YAML::Tiny found illegal characters in plain scalar: 'key: &a value' at /yaml/bin/perl-tiny-json line 12.
ni
YAML::Tiny found illegal characters in plain scalar: 'key: &a value' at /yaml/bin/perl-tiny-perl line 15.