pest-parser / site

This repo contains the source code for https://pest.rs
http://pest.rs/
Apache License 2.0
13 stars 16 forks source link

integrate a web version of `pest_debugger` #14

Open tomtau opened 1 year ago

tomtau commented 1 year ago

The pest_debugger core functionality has been extracted to a standalone crate that could be used in frontends other than a command line. It will be cool to have something like regex101 for pest.

alexkeizer commented 1 year ago

I'm new to pest, but I'd like to have a look at this and help out!

Could you describe a bit more what the desired end result is? I saw https://pest.rs/#editor, which closely matches what I thought you meant with "regex101 for pest".

tomtau commented 1 year ago

@alexkeizer have you tried the command line version of the pest debugger?

alexkeizer commented 1 year ago

I just tried it a bit, but most of all I just noticed that regex101 has an actual step-by-step debugger going on (I only knew it for the match highlighting), so now the reference makes a lot more sense.

So, more specifically, you're looking for something like https://regex101.com/debugger for pest, correct?

tomtau commented 1 year ago

Yes, perhaps one more potential way could be tracing in a collapsable HTML tree like in this tool:

https://github.com/fasterthanlime/pegviz

tomtau commented 1 year ago

this may be perhaps useful: https://tabatkins.github.io/railroad-diagrams/ https://github.com/pest-parser/pest/discussions/803 https://github.com/pest-parser/pest/discussions/807