https://github.com/darthwalsh/justanotheryamlparser
Parse YAML using the official BNF grammar
https://github.com/darthwalsh/justanotheryamlparser
bnf yaml
Last synced: 7 months ago
JSON representation
Parse YAML using the official BNF grammar
- Host: GitHub
- URL: https://github.com/darthwalsh/justanotheryamlparser
- Owner: darthwalsh
- Created: 2020-07-29T00:22:40.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-14T20:51:37.000Z (8 months ago)
- Last Synced: 2025-02-14T21:32:29.013Z (8 months ago)
- Topics: bnf, yaml
- Language: Python
- Homepage:
- Size: 101 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Just Another YAML Parser
Clone like `git clone --recurse-submodules ...`
## Running tests
Set up a virtual environment:
python3 -m venv env
On macOS and Linux:
source env/bin/activate
Or on Windows:
.\env\Scripts\activate
Install dependencies:
pip install -r requirements.txt
Run tets:
pytest
## Roadmap
- [ ] Debug parsing showing how each rule is applied
- [ ] Parsing *presentation* (text) into *serialization* tree
- [ ] Composing *serialization* into *representation* JSON## Regenerating 1.2.2 productions.bnf
https://yaml.org/spec/1.2.2/ contains HTML for the spec, but [yaml/yaml-spec](https://github.com/yaml/yaml-spec.git) has the markdown source.
Run script `produce_bnf.py` which uses yaml-spec as a submodule to produce `productions.bnf`.