nameless-peg-parser

Crates.ionameless-peg-parser
lib.rsnameless-peg-parser
version0.1.2
sourcesrc
created_at2024-07-07 09:08:43.301648
updated_at2024-07-07 20:20:13.339681
descriptionAn implementation of PEG, still unstable
homepage
repositoryhttps://github.com/VoidedName/nameless-peg-parser
max_upload_size
id1294667
size60,581
Voided Name (VoidedName)

documentation

README

Nameless PEG Parser

This is an implementation of https://bford.info/pub/lang/peg.pdf

I implemented it mostly out of academic curiosity and it is not optimized in any way shape or form.

There are two examples included in the examples folder, one for success, one for failure.

The parser logs to debug! and error! or the log module, if you want to see some logs, include your logging implementation and enable the appropriate log level. The examples include env_logger and logging can be enabled by setting the env variable "RUST_LOG=debug".

Usage:

let parser = PEG::from_grammar(start_rule, grammar_string)?;
let result = parser.parse(input_string);

Feel free to make PRs :), I will most likely continue tinkering with it and maybe even properly optimize it.

YT: https://www.youtube.com/watch?v=awtHSLEIFxA

Can be found as a crate: https://docs.rs/nameless-peg-parser/latest/nameless_peg_parser/index.html

Commit count: 19

cargo fmt