Crates.io | pest_ascii_tree |
lib.rs | pest_ascii_tree |
version | 0.1.0 |
source | src |
created_at | 2019-10-14 10:00:22.283407 |
updated_at | 2019-10-14 10:00:22.283407 |
description | Helper crates converting the parsing result of any pest grammar into an ascii tree. |
homepage | |
repository | https://github.com/Robert42/pest_ascii_tree |
max_upload_size | |
id | 172403 |
size | 11,485 |
This is a small helper crate useful for quickly debugging your pest
grammar.
The rules found by parsing the file are formated into an
ascii_tree
.
It is useful, you you want to quickly debug your grammar without
having to write specialized code for handling the Pairs
iterator
returned by your pest parser.
Example, for whan an output might look like.
expr ├─ expr │ ├─ val "u" │ ├─ op "+" │ └─ expr │ ├─ val "v" │ ├─ op "+" │ └─ val "w" ├─ op "+" ├─ expr │ ├─ val "x" │ ├─ op "+" │ └─ val "y" ├─ op "+" └─ val "z"
Please, that the EOI
rule is skipped.