--- &test-YJV2
Title: Dash in flow sequence
Tags: [ flow, sequence ]
invalid_incorrect
+STR
+DOC
+SEQ []
=VAL :-
-SEQ
-DOC
-STR
invalid_incorrect
+STR
+DOC
+SEQ
=VAL :-
-SEQ
-DOC
-STR
invalid_incorrect
+STR
+DOC
+SEQ []
=VAL :-
-SEQ
-DOC
-STR
invalid_incorrect
+STR
+DOC
+SEQ
=VAL :-
-SEQ
-DOC
-STR
invalid_incorrect
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 =TEXT|-
1 2 2 2 -VAL |
1 2 2 2 -NODE|
1 2 2 2 =SYNX|]
1 3 3 3 -SEQ |
1 3 3 3 -NODE|
1 3 3 3 =EOL |\x0a
2 0 4 4 -DOC |
invalid_incorrect
[
"-"
]
invalid_incorrect
[
'-'
]
invalid_incorrect
[
"-"
]
invalid_incorrect
[
'-'
]
invalid_incorrect
[
"-"
]
invalid_incorrect
[
'-'
]
invalid_incorrect
+STR
+DOC
+SEQ []
=VAL :-
-SEQ
-DOC
-STR
invalid_incorrect
[
"-"
]
invalid_incorrect
+STR
+DOC
+SEQ []
=VAL :-
-SEQ
-DOC
-STR
invalid_incorrect
[
"-"
]
invalid_incorrect
+STR
+DOC
+SEQ
=VAL :-
-SEQ
-DOC
-STR
invalid_correct
stdin:1:2: error: plain scalar cannot start with '-' followed by ,[]{} (in flow context)
[-]
^~
+STR
invalid_correct
stdin:1:2: error: plain scalar cannot start with '-' followed by ,[]{} (in flow context)
[-]
^~
invalid_correct
Parsing error near byte offset Pos {posByteOffset = 1, posCharOffset = 1, posLine = 1, posColumn = 1} (Unexpected '-')
+STR
+DOC
+SEQ []
-SEQ
invalid_correct
hsyaml-parser: user error (Unexpected '-')
invalid_correct
/node/node_modules/js-yaml/lib/loader.js:187
throw generateError(state, message);
^
YAMLException: missed comma between flow collection entries (1:2)
1 | [-]
------^
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 readFlowCollection (/node/node_modules/js-yaml/lib/loader.js:758:7)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1442:11)
at readBlockMapping (/node/node_modules/js-yaml/lib/loader.js:1104:12)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1441:12)
at readDocument (/node/node_modules/js-yaml/lib/loader.js:1625:3)
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) {
reason: 'missed comma between flow collection entries',
mark: {
name: null,
buffer: '[-]\n',
position: 1,
line: 0,
column: 1,
snippet: ' 1 | [-]\n------^'
}
}
Node.js v20.13.1
invalid_correct
Block collections are not allowed within flow collections at line 1, column 2:
[-]
^
+STR
+DOC
+SEQ []
invalid_correct
/yaml/bin/js-yaml-json:9
if (doc.errors.length !== 0) throw doc.errors[0]
^
YAMLParseError: Block collections are not allowed within flow collections at line 1, column 2:
[-]
^
at Composer.onError (/node/node_modules/yaml/dist/compose/composer.js:69:34)
at Object.resolveFlowCollection (/node/node_modules/yaml/dist/compose/resolve-flow-collection.js:97:17)
at resolveCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:16:37)
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)
at Composer.next (/node/node_modules/yaml/dist/compose/composer.js:149:40)
at next (<anonymous>)
at Composer.compose (/node/node_modules/yaml/dist/compose/composer.js:131:25)
at compose.next (<anonymous>) {
code: 'BLOCK_IN_FLOW',
pos: [ 1, 2 ],
linePos: [ { line: 1, col: 2 }, { line: 1, col: 3 } ]
}
Node.js v20.13.1
invalid_correct
/tmp/NimYAML-0.16.0/yaml/stream.nim(134) nimyaml_event
/tmp/NimYAML-0.16.0/yaml/stream.nim(99) next
/tmp/NimYAML-0.16.0/yaml/parser.nim(160) :anonymous
/tmp/NimYAML-0.16.0/yaml/parser.nim(470) atBlockIndentationProps
/tmp/NimYAML-0.16.0/yaml/stream.nim(106) next
[[reraised from:
/tmp/NimYAML-0.16.0/yaml/stream.nim(134) nimyaml_event
/tmp/NimYAML-0.16.0/yaml/stream.nim(101) next
]]
Error: unhandled exception: Unexpected token (expected flow node): SeqItemInd [YamlStreamError]
+STR
+DOC
invalid_correct
Line : 1
Column : 2
Message : Invalid plain scalar
Where : /perl5/lib/perl5/YAML/PP/Lexer.pm line 378
YAML : "-]"
at /yaml/bin/perl-pp-event line 46.
+STR
+DOC
+SEQ []
invalid_correct
Line : 1
Column : 2
Message : Invalid plain scalar
Where : /perl5/lib/perl5/YAML/PP/Lexer.pm line 378
YAML : "-]"
at /perl5/lib/perl5/YAML/PP/Loader.pm line 94.
invalid_correct
Line : 1
Column : 2
Message : Invalid plain scalar
Where : /perl5/lib/perl5/YAML/PP/Lexer.pm line 378
YAML : "-]"
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 failed to classify line '[-]' at /yaml/bin/perl-tiny-json line 12.
invalid_correct
YAML::Tiny failed to classify line '[-]' at /yaml/bin/perl-tiny-perl line 15.
invalid_correct
YAML Error: Expected separator '---'
Code: YAML_PARSE_ERR_NO_SEPARATOR
Line: 1
Document: 2
at /perl5/lib/perl5/YAML/Loader.pm line 88.
invalid_correct
YAML Error: Expected separator '---'
Code: YAML_PARSE_ERR_NO_SEPARATOR
Line: 1
Document: 2
at /perl5/lib/perl5/YAML/Loader.pm line 88.