Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aofdev/yaml-peg
PEG parser for YAML written in Rust 🦀
https://github.com/aofdev/yaml-peg
grammar hacktoberfest parser parsing parsing-expression-grammar peg rust yaml
Last synced: 25 days ago
JSON representation
PEG parser for YAML written in Rust 🦀
- Host: GitHub
- URL: https://github.com/aofdev/yaml-peg
- Owner: aofdev
- License: mit
- Created: 2021-08-29T12:49:21.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-30T11:27:08.000Z (over 3 years ago)
- Last Synced: 2024-04-14T03:55:51.464Z (8 months ago)
- Topics: grammar, hacktoberfest, parser, parsing, parsing-expression-grammar, peg, rust, yaml
- Language: Rust
- Homepage:
- Size: 9.77 KB
- Stars: 7
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pest - yaml-peg - PEG parser for YAML written in Rust. (Projects)
README
# yaml-peg
![Check lint, format and tests](https://github.com/aofdev/yaml-peg/actions/workflows/main.yml/badge.svg)
PEG parser ([pest](https://pest.rs/)) for YAML written in Rust 🦀
## Quick Start ⚡️
```bash
# Run
cargo run -- --file example_files/test.yaml# Output
{
"xmas": "true",
"calling-birds": "[\"huey\", \"dewey\", \"louie\", \"fred\"]",
"birds": "[\"huey-2\", \"dewey-2\"]",
"french-hens": "3",
"ray": "a drop of golden sun",
"test1": "false",
"doe": "a deer, a female deer",
"pi": "3.14159",
"array-test": "[\"DFASf\", \"2222\"]",
"str-folded-style": " that is folded into two lines and it is not indented into three lines\n",
"str-literal-style": " this is my very very very\n long string\n that is folded\n into two lines\n and it is not indented\n"
}
```## TODO
- [x] One level
- [x] String multiline (folded-style, literal-style)
- [ ] Nested levels
- [ ] YAML 1.2
- [ ] Change binary to library