A flow sequence entry that begins with ':' (e.g. '[ : v ]') is a
single-pair mapping with an empty key, which YAML 1.2 permits but libyaml
rejects by handing the leading VALUE token to its node parser.
Open the implicit single-pair mapping on a leading ':' in the
flow-sequence-entry parser, and leave the VALUE token for the mapping
value state to consume so the value is parsed rather than dropped.
Surpasses libyaml on CFD4. Port score 298 -> 299.
A ':' value indicator with no preceding key is also valid inside a flow
mapping, denoting an entry whose key is empty (null). libyaml hands the
bare VALUE token to its node parser and fails with 'did not find expected
node content'. The flow-mapping-key parser now emits the empty scalar key
and lets the value state consume the indicator.
Fixes '{ : }' and '{ key: value, : empty key }', completing the
multi-document NKF9 case. Port score 282 -> 283.
Ports parser.c: the one-event-at-a-time state machine that turns the
scanner's token stream into the YAML event stream. Covers stream and
document framing, directive processing with %TAG handle resolution and
default handles, the node property/tag/anchor production, block and
indentless sequences, block mappings, and flow sequences and mappings
including the single-pair `?` mapping forms.
Output verified against the libyaml reference event dumper: the empty
mapping value, %TAG resolution, and shorthand tags all match byte for
byte. 331 tests, no regression.