--- &test-SU5Z
Title: Comment without whitespace after doublequoted scalar
Tags: [ comment, double, error, whitespace ]
key: "value"# invalid comment
+STR
+DOC
+MAP
=VAL :key
=VAL "value
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL "value
-MAP
-DOC
-STR
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL 'value
-MAP
-DOC
-STR
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL :value
-MAP
-DOC
-STR
invalid_incorrect
{"key":"value"}
invalid_incorrect
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 +VAL |
1 0 0 0 =TEXT|key
1 3 3 3 -VAL |
1 3 3 3 -NODE|
1 3 3 3 =SYNX|:
1 4 4 4 =WSPC|.
1 5 5 5 +NODE|
1 5 5 5 +VAL |
1 5 5 5 =SYNX|"
1 6 6 6 =TEXT|value
1 11 11 11 =SYNX|"
1 12 12 12 -VAL |
1 12 12 12 -NODE|
1 12 12 12 =ERR |Expected.start.of.line
1 12 12 12 =REST|#.invalid.comment
1 29 29 29 =REST|\x0a
2 0 30 30 -PAIR|
2 0 30 30 -MAP |
2 0 30 30 -NODE|
2 0 30 30 -DOC |
invalid_incorrect
{"key":"value"}
invalid_incorrect
{"key":"value"}
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL "value
-MAP
-DOC
-STR
invalid_incorrect
{
"key" : "value"
}
invalid_incorrect
{
'key' => 'value'
}
invalid_incorrect
{
"key" : "value"
}
invalid_incorrect
{
'key' => 'value'
}
invalid_incorrect
{
"key" : "value"
}
invalid_incorrect
{
'key' => 'value'
}
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL "value
-MAP
-DOC
-STR
invalid_incorrect
{
"key": "value"
}
invalid_incorrect
{'key': 'value'}
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL "value
-MAP
-DOC
-STR
invalid_incorrect
{
"key": "value"
}
invalid_incorrect
{'key': 'value'}
invalid_incorrect
{"key":"value"}
invalid_incorrect
+STR
+DOC
+MAP
=VAL :key
=VAL "value
-MAP
-DOC
-STR
invalid_correct
stdin:1:13: error: invalid comment without whitespace after double-quoted scalar
key: "value"# invalid comment
^
+STR
+DOC
+MAP
=VAL :key
invalid_correct
stdin:1:13: error: invalid comment without whitespace after double-quoted scalar
key: "value"# invalid comment
^
invalid_correct
Unhandled exception. YamlDotNet.Core.SyntaxErrorException: (Line: 1, Col: 13, Idx: 12) - (Line: 1, Col: 13, Idx: 12): While scanning a flow sequence end, found invalid comment after double-quoted scalar.
at YamlDotNet.Core.Parser.ParseBlockMappingKey(Boolean isFirst)
at YamlDotNet.Core.Parser.StateMachine()
at YamlDotNet.Core.Parser.MoveNext()
at YamlDotNet.RepresentationModel.LibYamlEventStream.WriteTo(TextWriter textWriter)
at Program.Main(String[] commandLineArguments)
Aborted (core dumped)
+STR
+DOC
+MAP
=VAL :key
=VAL "value
invalid_correct
Unhandled exception. YamlDotNet.Core.SyntaxErrorException: (Line: 1, Col: 13, Idx: 12) - (Line: 1, Col: 13, Idx: 12): While scanning a flow sequence end, found invalid comment after double-quoted scalar.
at YamlDotNet.Core.Parser.ParseBlockMappingKey(Boolean isFirst)
at YamlDotNet.Core.Parser.StateMachine()
at YamlDotNet.Core.Parser.MoveNext()
at YamlDotNet.Core.ParserExtensions.TryConsume[T](IParser parser, T& event)
at YamlDotNet.Serialization.NodeDeserializers.ScalarNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.<>c__DisplayClass3_0.<DeserializeValue>b__0(IParser r, Type t)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.DeserializeHelper(Type tKey, Type tValue, IParser parser, Func`3 nestedObjectDeserializer, IDictionary result)
at YamlDotNet.Serialization.NodeDeserializers.DictionaryNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.ValueDeserializers.AliasValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
at YamlDotNet.Serialization.Deserializer.Deserialize(IParser parser, Type type)
at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input, Type type)
at YamlDotNet.Serialization.Deserializer.Deserialize(TextReader input)
at Program.Main(String[] commandLineArguments)
Aborted (core dumped)
invalid_correct
Parsing error near byte offset Pos {posByteOffset = 12, posCharOffset = 12, posLine = 1, posColumn = 12} (Expected start of line)
+STR
+DOC
+MAP
=VAL :key
=VAL "value
invalid_correct
hsyaml-parser: user error (Expected start of line)
invalid_correct
Comments must be separated from other tokens by white space characters at line 1, column 13:
key: "value"# invalid comment
^^^^^^^^^^^^^^^^^
+STR
+DOC
+MAP
=VAL :key
=VAL "value
-MAP
-DOC
-STR
invalid_correct
/yaml/bin/js-yaml-json:9
if (doc.errors.length !== 0) throw doc.errors[0]
^
YAMLParseError: Comments must be separated from other tokens by white space characters at line 1, column 13:
key: "value"# invalid comment
^^^^^^^^^^^^^^^^^
at Composer.onError (/node/node_modules/yaml/dist/compose/composer.js:69:34)
at Object.resolveEnd (/node/node_modules/yaml/dist/compose/resolve-end.js:16:25)
at Object.resolveFlowScalar (/node/node_modules/yaml/dist/compose/resolve-flow-scalar.js:35:27)
at Object.composeScalar (/node/node_modules/yaml/dist/compose/compose-scalar.js:11:29)
at composeNode (/node/node_modules/yaml/dist/compose/compose-node.js:24:34)
at Object.resolveBlockMap (/node/node_modules/yaml/dist/compose/resolve-block-map.js:83:19)
at resolveCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:13:27)
at Object.composeCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:47:16)
at Object.composeNode (/node/node_modules/yaml/dist/compose/compose-node.js:31:38)
at Object.composeDoc (/node/node_modules/yaml/dist/compose/compose-doc.js:34:23) {
code: 'MISSING_CHAR',
pos: [ 12, 29 ],
linePos: [ { line: 1, col: 13 }, { line: 1, col: 30 } ]
}
Node.js v20.13.1
invalid_correct
Line : 1
Column : 13
Message : Invalid plain scalar
Where : /perl5/lib/perl5/YAML/PP/Lexer.pm line 378
YAML : "# invalid comment"
at /yaml/bin/perl-pp-event line 46.
+STR
+DOC
+MAP
=VAL :key
invalid_correct
Line : 1
Column : 13
Message : Invalid plain scalar
Where : /perl5/lib/perl5/YAML/PP/Lexer.pm line 378
YAML : "# invalid comment"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
invalid_correct
Line : 1
Column : 13
Message : Invalid plain scalar
Where : /perl5/lib/perl5/YAML/PP/Lexer.pm line 378
YAML : "# invalid comment"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
invalid_correct
Parser finished before end of input at /perl5/lib/perl5/YAML/Parser.pm line 4056, <> line 1.
invalid_correct
YAML::Tiny does not support a feature in line '"value"# invalid comment' at /yaml/bin/perl-tiny-json line 12.
invalid_correct
YAML::Tiny does not support a feature in line '"value"# invalid comment' at /yaml/bin/perl-tiny-perl line 15.
invalid_correct
YAML Error: Couldn't parse single line value
Code: YAML_PARSE_ERR_SINGLE_LINE
Line: 1
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 164.
invalid_correct
YAML Error: Couldn't parse single line value
Code: YAML_PARSE_ERR_SINGLE_LINE
Line: 1
Document: 1
at /perl5/lib/perl5/YAML/Loader.pm line 164.