shape/anchor/an alias written before its anchor

sha256 49bdb435d91838a9c0296d3d599b7d7c234ecb9f19d663c629deebada51f4024

Document

aliased: *x
kept:
  nested: 1
  list:
    - a
    - b
also: |
  literal
  content
anchored: &x plain text

Corpus

grammarvalid, vouched for up to construct
anchor/alias-forwardreject from compose on, 7.1: the anchor must precede the alias, so a forward reference names nothing
featuresnone
meaning (none stated)

Answer groups

verdict split

go-yaml yaml.v3

refuse by the composer

libfyaml

accept, then the loader refuses past parse

perlref

accept

yamlstar

refuse by the loader

value

No source answered.

roundtrip

No source answered.

Each parser

parserverdictvalueround tripreasonmessage
perlref accepted accept n/i n/i
libfyaml accepted refuse by the loader not scored n/i ValueError: Failed to parse YAML/JSON
yamlstar rejected, settled refuse by the loader not scored n/i anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing Error: Unknown anchor: x
yaml.v3 rejected, settled refuse by the composer not scored refused anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing yaml.v3: yaml: unknown anchor 'x' referenced
go-yaml rejected, settled refuse by the composer not scored refused anchor/alias-forward: 7.1: the anchor must precede the alias, so a forward reference names nothing [1:11] could not find alias "x"

Corpus compact, 28279 cases, yamlcorpus/48. Run 2026-11-26 22:12 UTC, 23m30s.