# YAML Test Matrix

--- &test-Q5MG
  Title: Tab at beginning of line followed by a flow mapping
  Tags: [ flow, whitespace ]

YAML

	{}

Expected Events

+STR
+DOC
+MAP {}
-MAP
-DOC
-STR

Expected JSON

{}

c-libfyaml-event

 ok

cpp-rapidyaml-event

 ok

cpp-yamlcpp-event

 ok

dotnet-yamldotnet-event

 ok

hs-hsyaml-event

 ok

js-yaml-event

 ok

nim-nimyaml-event

 ok

perl-pp-event

 ok

perl-refparser-event

 ok

c-libfyaml-json

 json_ok

dotnet-yamldotnet-json

 json_ok

hs-hsyaml-json

 json_ok

js-jsyaml-json

 json_ok

js-yaml-json

 json_ok

perl-pp-json

 json_ok

perl-syck-json

 json_ok

rust-yamlrust-event

 diff
Minimal Events:
+STR
+DOC
+MAP
-MAP
-DOC
-STR
Transformed Events:
+STR
+DOC
=VAL :\t{}
-DOC
-STR
Got Events:
+STR
+DOC
=VAL :\t{}
-DOC
-STR

c-libyaml-event

 error
+STR
Parse error: found character that cannot start any token

go-yaml-json

 error
yaml: found character that cannot start any token

lua-lyaml-json

 error
luajit: 1:1: 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:496: in function 'load'
	/yaml/bin/lua-lyaml-json:6: in main chunk
	[C]: at 0x557fdf13ced0

perl-pplibyaml-json

 error
YAML::PP::LibYAML Error: The problem:

    found character that cannot start any token

was found at 
while scanning for the next token at line: 1, column: 1

perl-pplibyaml-perl

 error
YAML::PP::LibYAML Error: The problem:

    found character that cannot start any token

was found at 
while scanning for the next token at line: 1, column: 1

perl-xs-json

 error
YAML::XS::Load Error: The problem:

    found character that cannot start any token

was found at document: 1
while scanning for the next token at line: 1, column: 1

perl-xs-perl

 error
YAML::XS::Load Error: The problem:

    found character that cannot start any token

was found at document: 1
while scanning for the next token at line: 1, column: 1

perl-yaml-json

 error
YAML Error: YAML_PARSE_ERR_NONSPACE_INDENTATION
   Code: YAML_PARSE_ERR_NONSPACE_INDENTATION
   Line: 1
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 748.

perl-yaml-perl

 error
YAML Error: YAML_PARSE_ERR_NONSPACE_INDENTATION
   Code: YAML_PARSE_ERR_NONSPACE_INDENTATION
   Line: 1
   Document: 1
 at /perl5/lib/perl5/YAML/Loader.pm line 748.

py-pyyaml-event

 error
+STR
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 142, in parse_implicit_document_start
    if not self.check_token(DirectiveToken, DocumentStartToken,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1, column 1:
    	{}
    ^

py-pyyaml-json

 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 129, in load_all
    while loader.check_data():
          ^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 32, in check_data
    return self.check_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 22, in check_node
    return not self.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 142, in parse_implicit_document_start
    if not self.check_token(DirectiveToken, DocumentStartToken,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1, column 1:
    	{}
    ^

py-pyyaml-py

 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 129, in load_all
    while loader.check_data():
          ^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/constructor.py", line 32, in check_data
    return self.check_node()
           ^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/yaml/composer.py", line 22, in check_node
    return not self.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 142, in parse_implicit_document_start
    if not self.check_token(DirectiveToken, DocumentStartToken,
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1, column 1:
    	{}
    ^

py-ruamel-event

 error
+STR
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 187, in parse_implicit_document_start
    if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1, column 1:
    	{}
    ^ (line: 1)

py-ruamel-json

 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 475, in load_all
    while constructor.check_data():
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 105, in check_data
    return self.composer.check_node()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 58, in check_node
    return not self.parser.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 187, in parse_implicit_document_start
    if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1, column 1:
    	{}
    ^ (line: 1)

py-ruamel-py

 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 475, in load_all
    while constructor.check_data():
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/constructor.py", line 105, in check_data
    return self.composer.check_node()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/python/lib/python3.12/site-packages/ruamel/yaml/composer.py", line 58, in check_node
    return not self.parser.check_event(StreamEndEvent)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 187, in parse_implicit_document_start
    if not self.scanner.check_token(DirectiveToken, DocumentStartToken, StreamEndToken):
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  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 1, column 1:
    	{}
    ^ (line: 1)

ruby-psych-json

 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 1 column 1 (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>'

hs-reference-yeast

 na
Line  Col Char Byte Token|Content
   1    0    0    0 +DOC |
   1    0    0    0 =WSPC|\x09
   1    1    1    1 +NODE|
   1    1    1    1 +MAP |
   1    1    1    1 =SYNX|{
   1    2    2    2 =SYNX|}
   1    3    3    3 -MAP |
   1    3    3    3 -NODE|
   1    3    3    3 =EOL |\x0a
   2    0    4    4 -DOC |

perl-pp-perl

 na
{}

perl-syck-perl

 na
{}

perl-tiny-json

 ni
YAML::Tiny failed to classify line '	{}' at /yaml/bin/perl-tiny-json line 12.

perl-tiny-perl

 ni
YAML::Tiny failed to classify line '	{}' at /yaml/bin/perl-tiny-perl line 15.