aeliot / yaml-token
Tokenizer of YAML
Requires
- php: ^8.2
- ext-ctype: *
Requires (Dev)
- dg/bypass-finals: ^1.7
README
A YAML parser that represents YAML as a hierarchical structure of nodes and tokens.
Purpose
The library enables working with YAML not only as data but as a full structure of the source text represented by nodes and tokens. It provides base layer for the analysis and modification of YAML with isolated impact and without side effects.
Unlike symfony/yaml, which is designed for YAML → array
and array → YAML conversion, this library provides a mechanism for analyzing and precisely
manipulating the source YAML.
YAML Specifications
- YAML 1.0 (2004-01-29)
- YAML 1.1 (2005-01-18)
- YAML 1.1: merge (2005-01-18)
- YAML 1.2.0 (2009-07-21)
- YAML 1.2.1 (2009-10-01)
- YAML 1.2.2 (2021-10-01)
- Specification Changes
Mapping project terms to the YAML specification
Acknowledgments
Thanks to Masaaki Goshima for goccy/go-yaml
test fixtures used under the MIT License and with the author's permission in tests/fixture/go_yaml/
and tests/fixture/go_yaml_extra/.
Third-party notices
This repository includes third-party materials that are not covered solely by the copyright in LICENSE. Their sources, scope, and license terms are listed in THIRD_PARTY_NOTICES.md.
Contributing
Feedback and contributions are welcome. Open an issue to discuss larger changes before investing significant time. Pull requests for fixes and tests are appreciated.