Implement libyaml's simple-key mechanism for flow context: the scanner records a potential key position before a plain or quoted scalar, an anchor/tag, or a [/{ opener, and a later ':' splices a mappingKey token retroactively in front of that node. This lets a quoted scalar ("k":v), a nested collection ({k}:v), or a property-carrying node (&c c: d) become a flow mapping key. In flow context ':' is always a value indicator and '?' always an explicit-key indicator regardless of the next character (the block-only following-blank lookahead is disabled), so adjacent forms and trailing '?' parse, and multi-line plain keys fold before the ':' is read. The flow parser is rebuilt around the flow_sequence_entry / flow_mapping_key / flow_mapping_value productions, composing empty scalars for absent keys and values. The streaming token cursor now buffers an open flow collection's tokens until it closes so the retroactive key splice stays valid.
Flips 10 official YAML test suite cases (348/402): 4FJ6, 8KB6, 9BXH, 9MMW, CN3R, DFF7, FRK4, NJ66, UT92, CT4Q. Flow collections used as block mapping keys (LX3P, 6BFJ) need the splice in block context and stay tracked. Updates manifest, fixtures, counts, and roadmap.
499 lines
13 KiB
YAML
499 lines
13 KiB
YAML
version: 1
|
|
description: PureYAML conformance gaps vs the official YAML test suite
|
|
source:
|
|
repository: yaml/yaml-test-suite
|
|
branch: data
|
|
commit: 6ad3d2c62885d82fc349026c136ef560838fdf3d
|
|
license: MIT
|
|
# Each entry is a case PureYAML does NOT yet handle correctly.
|
|
# category: false-reject | json-mismatch | accepted-invalid
|
|
# expected: what a conformant parser must do (parse-ok | reject)
|
|
# current: PureYAML's present behavior (parse-error | value-mismatch | accepted)
|
|
cases:
|
|
- id: "2G84/00"
|
|
name: "Literal modifers"
|
|
localPath: yaml-test-suite/2G84/00/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 7
|
|
lineCount: 1
|
|
- id: "2G84/01"
|
|
name: "Literal modifers"
|
|
localPath: yaml-test-suite/2G84/01/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 8
|
|
lineCount: 1
|
|
- id: "2SXE"
|
|
name: "Anchors With Colon in Name"
|
|
localPath: yaml-test-suite/2SXE/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 29
|
|
lineCount: 3
|
|
- id: "3HFZ"
|
|
name: "Invalid content after document end marker"
|
|
localPath: yaml-test-suite/3HFZ/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 27
|
|
lineCount: 3
|
|
- id: "4JVG"
|
|
name: "Scalar value with two anchors"
|
|
localPath: yaml-test-suite/4JVG/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 54
|
|
lineCount: 4
|
|
- id: "55WF"
|
|
name: "Invalid escape in double quoted string"
|
|
localPath: yaml-test-suite/55WF/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 9
|
|
lineCount: 2
|
|
- id: "57H4"
|
|
name: "Spec Example 8.22. Block Collection Nodes"
|
|
localPath: yaml-test-suite/57H4/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: parse-error
|
|
byteCount: 67
|
|
lineCount: 6
|
|
- id: "5U3A"
|
|
name: "Sequence on same Line as Mapping Key"
|
|
localPath: yaml-test-suite/5U3A/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 18
|
|
lineCount: 2
|
|
- id: "62EZ"
|
|
name: "Invalid block mapping key on same line as previous key"
|
|
localPath: yaml-test-suite/62EZ/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 25
|
|
lineCount: 2
|
|
- id: "6BFJ"
|
|
name: "Mapping, key and flow sequence item anchors"
|
|
localPath: yaml-test-suite/6BFJ/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: none
|
|
current: parse-error
|
|
byteCount: 43
|
|
lineCount: 3
|
|
- id: "7LBH"
|
|
name: "Multiline double quoted implicit keys"
|
|
localPath: yaml-test-suite/7LBH/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 20
|
|
lineCount: 3
|
|
- id: "7ZZ5"
|
|
name: "Empty flow collections"
|
|
localPath: yaml-test-suite/7ZZ5/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 58
|
|
lineCount: 6
|
|
- id: "8XDJ"
|
|
name: "Comment in plain multiline value"
|
|
localPath: yaml-test-suite/8XDJ/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 26
|
|
lineCount: 3
|
|
- id: "9C9N"
|
|
name: "Wrong indented flow sequence"
|
|
localPath: yaml-test-suite/9C9N/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 20
|
|
lineCount: 4
|
|
- id: "9JBA"
|
|
name: "Invalid comment after end of flow sequence"
|
|
localPath: yaml-test-suite/9JBA/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 25
|
|
lineCount: 2
|
|
- id: "9MAG"
|
|
name: "Flow sequence with invalid comma at the beginning"
|
|
localPath: yaml-test-suite/9MAG/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 18
|
|
lineCount: 2
|
|
- id: "BF9H"
|
|
name: "Trailing comment in multiline plain scalar"
|
|
localPath: yaml-test-suite/BF9H/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 47
|
|
lineCount: 4
|
|
- id: "CTN5"
|
|
name: "Flow sequence with invalid extra comma"
|
|
localPath: yaml-test-suite/CTN5/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 19
|
|
lineCount: 2
|
|
- id: "CVW2"
|
|
name: "Invalid comment after comma"
|
|
localPath: yaml-test-suite/CVW2/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 25
|
|
lineCount: 3
|
|
- id: "CXX2"
|
|
name: "Mapping with anchor on document start line"
|
|
localPath: yaml-test-suite/CXX2/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 17
|
|
lineCount: 1
|
|
- id: "D49Q"
|
|
name: "Multiline single quoted implicit keys"
|
|
localPath: yaml-test-suite/D49Q/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 20
|
|
lineCount: 3
|
|
- id: "DC7X"
|
|
name: "Various trailing tabs"
|
|
localPath: yaml-test-suite/DC7X/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 26
|
|
lineCount: 4
|
|
- id: "DK95/01"
|
|
name: "Tabs that look like indentation"
|
|
localPath: yaml-test-suite/DK95/01/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: json
|
|
current: accepted
|
|
byteCount: 16
|
|
lineCount: 2
|
|
- id: "FH7J"
|
|
name: "Tags on Empty Scalars"
|
|
localPath: yaml-test-suite/FH7J/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: none
|
|
current: parse-error
|
|
byteCount: 51
|
|
lineCount: 5
|
|
- id: "G5U8"
|
|
name: "Plain dashes in flow sequence"
|
|
localPath: yaml-test-suite/G5U8/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 13
|
|
lineCount: 2
|
|
- id: "H7J7"
|
|
name: "Node anchor not indented"
|
|
localPath: yaml-test-suite/H7J7/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 21
|
|
lineCount: 3
|
|
- id: "HRE5"
|
|
name: "Double quoted scalar with escaped single quote"
|
|
localPath: yaml-test-suite/HRE5/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 31
|
|
lineCount: 2
|
|
- id: "HU3P"
|
|
name: "Invalid Mapping in plain scalar"
|
|
localPath: yaml-test-suite/HU3P/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 29
|
|
lineCount: 3
|
|
- id: "J3BT"
|
|
name: "Spec Example 5.12. Tabs and Spaces"
|
|
localPath: yaml-test-suite/J3BT/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 96
|
|
lineCount: 6
|
|
- id: "JEF9/02"
|
|
name: "Trailing whitespace in streams"
|
|
localPath: yaml-test-suite/JEF9/02/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 8
|
|
lineCount: 1
|
|
- id: "JKF3"
|
|
name: "Multiline unidented double quoted block key"
|
|
localPath: yaml-test-suite/JKF3/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 17
|
|
lineCount: 2
|
|
- id: "JY7Z"
|
|
name: "Trailing content that looks like a mapping"
|
|
localPath: yaml-test-suite/JY7Z/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 66
|
|
lineCount: 3
|
|
- id: "LX3P"
|
|
name: "Implicit Flow Mapping Key on one line"
|
|
localPath: yaml-test-suite/LX3P/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: none
|
|
current: parse-error
|
|
byteCount: 14
|
|
lineCount: 1
|
|
- id: "M5C3"
|
|
name: "Spec Example 8.21. Block Scalar Nodes"
|
|
localPath: yaml-test-suite/M5C3/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: parse-error
|
|
byteCount: 48
|
|
lineCount: 6
|
|
- id: "M7A3"
|
|
name: "Spec Example 9.3. Bare Documents"
|
|
localPath: yaml-test-suite/M7A3/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 74
|
|
lineCount: 7
|
|
- id: "NB6Z"
|
|
name: "Multiline plain value with tabs on empty lines"
|
|
localPath: yaml-test-suite/NB6Z/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 31
|
|
lineCount: 5
|
|
- id: "P2EQ"
|
|
name: "Invalid sequene item on same line as previous item"
|
|
localPath: yaml-test-suite/P2EQ/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 24
|
|
lineCount: 2
|
|
- id: "Q9WF"
|
|
name: "Spec Example 6.12. Separation Spaces"
|
|
localPath: yaml-test-suite/Q9WF/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: none
|
|
current: parse-error
|
|
byteCount: 97
|
|
lineCount: 6
|
|
- id: "QB6E"
|
|
name: "Wrong indented multiline quoted scalar"
|
|
localPath: yaml-test-suite/QB6E/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 20
|
|
lineCount: 4
|
|
- id: "QLJ7"
|
|
name: "Tag shorthand used in documents but only defined in the first"
|
|
localPath: yaml-test-suite/QLJ7/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 93
|
|
lineCount: 7
|
|
- id: "S4JQ"
|
|
name: "Spec Example 6.28. Non-Specific Tags"
|
|
localPath: yaml-test-suite/S4JQ/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 55
|
|
lineCount: 4
|
|
- id: "S98Z"
|
|
name: "Block scalar with more spaces than first content line"
|
|
localPath: yaml-test-suite/S98Z/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 42
|
|
lineCount: 5
|
|
- id: "SKE5"
|
|
name: "Anchor before zero indented sequence"
|
|
localPath: yaml-test-suite/SKE5/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: parse-error
|
|
byteCount: 26
|
|
lineCount: 5
|
|
- id: "SU5Z"
|
|
name: "Comment without whitespace after doublequoted scalar"
|
|
localPath: yaml-test-suite/SU5Z/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 30
|
|
lineCount: 1
|
|
- id: "SY6V"
|
|
name: "Anchor before sequence entry on same line"
|
|
localPath: yaml-test-suite/SY6V/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 25
|
|
lineCount: 1
|
|
- id: "UKK6/00"
|
|
name: "Syntax character edge cases"
|
|
localPath: yaml-test-suite/UKK6/00/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: none
|
|
current: parse-error
|
|
byteCount: 4
|
|
lineCount: 1
|
|
- id: "UV7Q"
|
|
name: "Legal tab after indentation"
|
|
localPath: yaml-test-suite/UV7Q/in.yaml
|
|
category: json-mismatch
|
|
expected: parse-ok
|
|
oracle: json
|
|
current: value-mismatch
|
|
byteCount: 13
|
|
lineCount: 3
|
|
- id: "V9D5"
|
|
name: "Spec Example 8.19. Compact Block Mappings"
|
|
localPath: yaml-test-suite/V9D5/in.yaml
|
|
category: false-reject
|
|
expected: parse-ok
|
|
oracle: none
|
|
current: parse-error
|
|
byteCount: 46
|
|
lineCount: 3
|
|
- id: "VJP3/00"
|
|
name: "Flow collections over many lines"
|
|
localPath: yaml-test-suite/VJP3/00/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 13
|
|
lineCount: 5
|
|
- id: "X4QW"
|
|
name: "Comment without whitespace after block scalar indicator"
|
|
localPath: yaml-test-suite/X4QW/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 27
|
|
lineCount: 2
|
|
- id: "Y79Y/003"
|
|
name: "Tabs in various contexts"
|
|
localPath: yaml-test-suite/Y79Y/003/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 18
|
|
lineCount: 4
|
|
- id: "YJV2"
|
|
name: "Dash in flow sequence"
|
|
localPath: yaml-test-suite/YJV2/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 4
|
|
lineCount: 1
|
|
- id: "ZCZ6"
|
|
name: "Invalid mapping in plain single line value"
|
|
localPath: yaml-test-suite/ZCZ6/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 11
|
|
lineCount: 1
|
|
- id: "ZL4Z"
|
|
name: "Invalid nested mapping"
|
|
localPath: yaml-test-suite/ZL4Z/in.yaml
|
|
category: accepted-invalid
|
|
expected: reject
|
|
oracle: none
|
|
current: accepted
|
|
byteCount: 14
|
|
lineCount: 2
|