--- &test-G5U8
Title: Plain dashes in flow sequence
Tags: [ flow, sequence ]
+STR
+DOC ---
+SEQ
+SEQ []
invalid_incorrect
+STR
+DOC ---
+SEQ
+SEQ []
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_incorrect
+STR
+DOC ---
+SEQ
+SEQ
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_incorrect
+STR
+DOC
+SEQ
+SEQ []
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_incorrect
+STR
+DOC ---
+SEQ
+SEQ
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_incorrect
[["-", "-"]]
invalid_incorrect
[["-","-"]]
invalid_incorrect
Line Col Char Byte Token|Content
1 0 0 0 +DOC |
1 0 0 0 =HEAD|---
1 3 3 3 +NODE|
1 3 3 3 =EOL |\x0a
2 0 4 4 +SEQ |
2 0 4 4 =SYNX|-
2 1 5 5 =WSPC|.
2 2 6 6 +NODE|
2 2 6 6 +SEQ |
2 2 6 6 =SYNX|[
2 3 7 7 +NODE|
2 3 7 7 +VAL |
2 3 7 7 =TEXT|-
2 4 8 8 -VAL |
2 4 8 8 -NODE|
2 4 8 8 =SYNX|,
2 5 9 9 =WSPC|.
2 6 10 10 +NODE|
2 6 10 10 +VAL |
2 6 10 10 =TEXT|-
2 7 11 11 -VAL |
2 7 11 11 -NODE|
2 7 11 11 =SYNX|]
2 8 12 12 -SEQ |
2 8 12 12 -NODE|
2 8 12 12 =EOL |\x0a
3 0 13 13 -SEQ |
3 0 13 13 -NODE|
3 0 13 13 -DOC |
invalid_incorrect
[["-","-"]]
invalid_incorrect
[
[
"-",
"-"
]
]
invalid_incorrect
[
[
'-',
'-'
]
]
invalid_incorrect
[
[
"-",
"-"
]
]
invalid_incorrect
[
[
'-',
'-'
]
]
invalid_incorrect
[
"[-, -]"
]
invalid_incorrect
[
'[-, -]'
]
invalid_incorrect
[
[
"-",
"-"
]
]
invalid_incorrect
[
[
'-',
'-'
]
]
invalid_incorrect
Argument "-" isn't numeric in addition (+) at /perl5/lib/perl5/YAML/Loader.pm line 491, <> line 1.
Argument "-" isn't numeric in addition (+) at /perl5/lib/perl5/YAML/Loader.pm line 491, <> line 1.
[
[
0,
0
]
]
invalid_incorrect
Argument "-" isn't numeric in addition (+) at /perl5/lib/perl5/YAML/Loader.pm line 491, <> line 1.
Argument "-" isn't numeric in addition (+) at /perl5/lib/perl5/YAML/Loader.pm line 491, <> line 1.
[
[
'0',
'0'
]
]
invalid_incorrect
+STR
+DOC ---
+SEQ
+SEQ []
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_incorrect
[
[
"-",
"-"
]
]
invalid_incorrect
[['-', '-']]
invalid_incorrect
+STR
+DOC ---
+SEQ
+SEQ []
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_incorrect
[
[
"-",
"-"
]
]
invalid_incorrect
[['-', '-']]
invalid_incorrect
[["-","-"]]
invalid_incorrect
+STR
+DOC
+SEQ
+SEQ
=VAL :-
=VAL :-
-SEQ
-SEQ
-DOC
-STR
invalid_correct
stdin:2:4: error: plain scalar cannot start with '-' followed by ,[]{} (in flow context)
- [-, -]
^~
+STR
+DOC ---
+SEQ
invalid_correct
stdin:2:4: error: plain scalar cannot start with '-' followed by ,[]{} (in flow context)
- [-, -]
^~
invalid_correct
Parsing error near byte offset Pos {posByteOffset = 7, posCharOffset = 7, posLine = 2, posColumn = 3} (Unexpected '-')
+STR
+DOC ---
+SEQ
+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 (2:4)
1 | ---
2 | - [-, -]
--------^
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 readBlockSequence (/node/node_modules/js-yaml/lib/loader.js:1008:5)
at composeNode (/node/node_modules/js-yaml/lib/loader.js:1440: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) {
reason: 'missed comma between flow collection entries',
mark: {
name: null,
buffer: '---\n- [-, -]\n',
position: 7,
line: 1,
column: 3,
snippet: ' 1 | ---\n 2 | - [-, -]\n--------^'
}
}
Node.js v20.13.1
invalid_correct
Implicit keys of flow sequence pairs need to be on a single line at line 2, column 4:
- [-, -]
^
+STR
+DOC ---
+SEQ
+SEQ []
invalid_correct
/yaml/bin/js-yaml-json:9
if (doc.errors.length !== 0) throw doc.errors[0]
^
YAMLParseError: Implicit keys of flow sequence pairs need to be on a single line at line 2, column 4:
- [-, -]
^
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:52: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 composeNode (/node/node_modules/yaml/dist/compose/compose-node.js:31:38)
at Object.resolveBlockSeq (/node/node_modules/yaml/dist/compose/resolve-block-seq.js:38:15)
at resolveCollection (/node/node_modules/yaml/dist/compose/compose-collection.js:15:31)
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: 'MULTILINE_IMPLICIT_KEY',
pos: [ 7, 8 ],
linePos: [ { line: 2, col: 4 }, { line: 2, col: 5 } ]
}
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 ---
+SEQ
invalid_correct
Line : 2
Column : 4
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
+SEQ []
invalid_correct
Line : 2
Column : 4
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 : 2
Column : 4
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.