{"repo":"kevinmehall/rust-peg","free":true,"listed":false,"github":"https://github.com/kevinmehall/rust-peg","clone":"git clone https://github.com/kevinmehall/rust-peg.git","description":"Parsing Expression Grammar (PEG) parser generator for Rust","language":"Rust","stars":1606,"topics":["parsing-expression-grammars","peg","rust","grammar","parsing","parser-generator"],"license":"MIT","category":"dev-tools","readme_excerpt":"Parsing Expression Grammars in Rust Documentation Release Notes rust-peg is a simple yet flexible parser generator that makes it easy to write robust parsers. Based on the Parsing Expression Grammar formalism, it provides a Rust macro that builds a recursive descent parser from a concise definition of the grammar. Features Parse input from &str , &[u8] , &[T] or custom types implementing traits Customizable reporting of parse errors Rules can accept arguments to create reusable rule templates Precedence climbing for prefix/postfix/infix expressions Helpful rustc error messages for errors in the grammar definition or the Rust code embedded within it Rule-level tracing to debug grammars Example Parse a comma-separated list of numbers surrounded by brackets into a Vec : See the tests for more examples Grammar rule syntax reference in rustdoc Comparison with similar parser generators crate parser type action code integration input type precedence climbing parameterized rules streaming input ----------- ------------- ------------- -------------------- ------------------------ --------------------- -------------------- ----------------- peg PEG in grammar proc macro (block) &str , &[T] , custom Yes Yes No [pest] PEG external proc macro (file) &str Yes No No [nom] combinators in source library &[u8] , custom No Yes Yes [lalrpop] LR(1) in grammar build script &str No Yes No [pest]: https://github.com/pest-parser/pest [nom]: https://github.com/geal/nom [lalrpop]: https://github.com/la","default_branch":null,"files":null,"tree":[],"storefront":"/r/kevinmehall","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/kevinmehall/rust-peg/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}