PureYAML/Sources/Parsing
Mihaela Mihaljevic cd05976fac feat(parsing): handle directives and document-end boundaries
Three root causes: (1) a '%' begins a directive only in directive position (before document content, outside flow); everywhere else it is plain content, fixing misfires inside plain scalars, flow mappings, and block scalars. (2) %YAML accepts any 1.x (a higher minor is treated as 1.2 without error), rejects major != 1 and duplicate %YAML, and requires a following '---'; reserved and %TAG directives are accepted and ignored. A directive not followed by a document start is rejected with the new directiveWithoutDocument error. (3) An explicit '...' end marker closes the current document so following content begins a fresh document in parseStream; single-document parse still rejects multi-document input at compose time.

Tests/UnsupportedYAMLGapsFixtures.swift, StreamParsingTests, ScannerTests, and ParsingErrorTests were updated in lockstep to assert the now-correct behavior (percent-after-content is plain text; '...' then content is two documents; %YAML 1.3 is valid while 2.0 and duplicate %YAML are rejected); no test was weakened and multi-document rejection for single-document parse is still covered.

Flips 15 official YAML test suite cases (295/402); SF5V, 9MMA, B63P, H7TQ now correctly rejected. 6LVF and W4TN are reclassified to json-mismatch (blocked by other scalar gaps). Updates the manifest, fixtures, counts, and roadmap.
2026-06-23 21:31:58 +02:00
..
BlockScalarChomping.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
BlockScalarStyle.swift feat(parsing): add reader scanner core 2026-06-05 07:40:23 +02:00
CollectionStyle.swift feat(parsing): add parse event model 2026-06-05 07:16:23 +02:00
Event.swift feat(parser): add multi-document stream parsing 2026-06-05 14:55:54 +02:00
EventComposer.Merge.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
EventComposer.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
EventStreamComposer.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
Mark.swift feat(parsing): add parse event model 2026-06-05 07:16:23 +02:00
NodeKind.swift feat(parsing): parse token stream into events 2026-06-05 09:56:18 +02:00
NodeProperties.swift feat(model): support complex mapping keys 2026-06-05 16:08:45 +02:00
NodeResult.swift feat(parsing): parse token stream into events 2026-06-05 09:56:18 +02:00
ParseError.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00
Parser.Events.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Parser.ScalarComposition.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00
Parser.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Reader.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scalar.swift fix(parsing): apply flow folding to quoted scalars 2026-06-23 20:17:56 +02:00
ScalarStyle.swift feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
Scanner.BlockScalar.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
Scanner.Directives.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00
Scanner.FlowContext.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scanner.Helpers.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
Scanner.Indentation.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
Scanner.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00
TagNormalizer.swift feat(tagged): add tag-preserving validation 2026-06-05 15:35:52 +02:00
Text.swift feat(parsing): compose events into values 2026-06-05 10:07:28 +02:00
Token.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
TokenCursor.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00
TokenEventParser.Block.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.EmptyNode.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.Flow.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.Helpers.swift fix(parsing): accept anchors, tags, and aliases as mapping keys 2026-06-23 21:07:47 +02:00
TokenEventParser.swift feat(parsing): handle directives and document-end boundaries 2026-06-23 21:31:58 +02:00