{"repo":"fasterthanlime/pegviz","free":true,"listed":false,"github":"https://github.com/fasterthanlime/pegviz","clone":"git clone https://github.com/fasterthanlime/pegviz.git","description":"PEG trace visualizer","language":"Rust","stars":95,"topics":["rust","peg","grammar","parser","debugging"],"license":"MIT","category":"dev-tools","readme_excerpt":"pegviz Visualizer for https://crates.io/crates/peg parsers. Screenshot pegviz reads peg's tracing markers and generates a collapsible HTML tree. Left side: Green: matched rule Yellow: partial match (see below) Red: failed rule Right side: Gray: previous input, for context Blue background: input matched by this rule White text: rest of input after matching Partial Matches A partial match is a (special kind of) match failure. It happens, if a rule consists of multiple sub-rules and some of them do match, but they do not all match. Consider for example the grammar Here both awesome and boring start with name() . When parsing a string like \"Paul is awesome due to his kindness. Ludwig is boring because of his cat.\" the first sentence will match to the awesome rule, the second does not, but it partially matches, because Ludwig also matches to name() . It will, though, match to the boring rule. Format pegviz expects input in the following format: The START and STOP marker are pegviz-specific, you'll need to add them to your program. See the Integration section for more information. Multiple traces may be processed, they'll all show up in the output file. Output that occurs between traces is ignored. Compatibility pegviz has been used with: peg 0.5.7 peg 0.6.2 peg 0.8.4 There are no tests. It's quickly thrown together. Integration In your crate, re-export the trace feature: Then, in your parser, add a tracing rule that captures all the input and outputs the markers pegviz is looking ","default_branch":null,"files":null,"tree":[],"storefront":"/r/fasterthanlime","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fasterthanlime/pegviz/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."}