PureYAML/Sources/Parsing
Mihaela Mihaljevic 1de1fcf2a8 fix(parsing): reject invalid input that was wrongly accepted
Tighten error detection per the YAML 1.2 spec across four rules: (1) a tab may never supply block-structure indentation (line-start indentation, block-scalar indentation, and separation before a nested block node are rejected; a tab separating an indicator from a scalar value stays valid); (2) a ---/... document marker inside an open quoted scalar or flow collection is rejected instead of silently ending the document; (3) a %YAML/%TAG line that opens a second explicit document with no intervening ... is rejected; (4) an anchor cannot be attached to an alias node.

This repairs 4 of the 5 error-detection regressions introduced by buckets 3-5 (MUS6/01, N782, SU74, Y79Y/009); 9MQT/01 is deferred (its invalidity is in same-line content after the --- marker, which needs document-content scanning that risks the baseline). Rejects 13 accepted-invalid suite cases and fixes 2 more by value (6BCT, Y79Y/010); 305/402 passing.

BEHAVIOR CHANGE: tab-indented block structure (previously parsed permissively) is now rejected per spec; no real-world corpus seed relied on this. Updates the manifest, fixtures, counts, two affected tests (with spec justification), and the roadmap (bucket 6 marked PARTIAL).
2026-06-23 22:13:35 +02:00
..
BlockScalarChomping.swift fix(parsing): correct block scalar folding and chomping 2026-06-23 20:01:03 +02:00
BlockScalarStyle.swift
CollectionStyle.swift
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
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): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00
Scanner.Directives.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00
Scanner.FlowContext.swift feat(parser): harden diagnostics and streaming 2026-06-06 07:57:48 +02:00
Scanner.Helpers.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00
Scanner.Indentation.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00
Scanner.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00
Scanner.Tabs.swift fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +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 fix(parsing): reject invalid input that was wrongly accepted 2026-06-23 22:13:35 +02:00