Skip to content

Commit

Permalink
feature: added a pest_debugger crate (fixes #98)
Browse files Browse the repository at this point in the history
based on the old PR by @dragostis: #277

Changes that were made:
- debugger core context was refactored and extracted to a lib (so that
it could be used in other frontends, e.g. editor plugins)
- CLI was extended using rustyline helpers to provide file completions,
history etc.
- applied suggestions from @hansihe from the old PR
(#277 (comment)):
1. added `ba` (add breakpoints at all rules) which is useful
for stepping through the entire grammar, plus breakpoint deletions
and loading input directly from readline;
2. added command line arguments.
- changed the listener function to return a boolean, so that
the debugger can signal back to a parsing thread to finish
before reaching its input's EOF.
  • Loading branch information
Tomas Tauber committed Nov 20, 2022
1 parent 7c021f3 commit be98cfc
Show file tree
Hide file tree
Showing 15 changed files with 899 additions and 19 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
@@ -1,6 +1,7 @@
[workspace]
members = [
"bootstrap",
"debugger",
"derive",
"generator",
"grammars",
Expand Down
26 changes: 26 additions & 0 deletions debugger/Cargo.toml
@@ -0,0 +1,26 @@
[package]
name = "pest_debugger"
description = "pest grammar debugger"
version = "2.5.0"
edition = "2021"
authors = ["Dragoș Tiselice <dragostiselice@gmail.com>", "Tomas Tauber <me@tomtau.be>"]
homepage = "https://pest.rs/"
repository = "https://github.com/pest-parser/pest"
documentation = "https://docs.rs/pest"
keywords = ["pest", "grammar", "debugger"]
categories = ["parsing"]
license = "MIT/Apache-2.0"
readme = "_README.md"
rust-version = "1.56"

[dependencies]
pest = { path = "../pest", version = "2.5.0" }
pest_meta = { path = "../meta", version = "2.5.0" }
pest_vm = { path = "../vm", version = "2.5.0" }
rustyline = "10"
thiserror = "1"

[badges]
codecov = { repository = "pest-parser/pest" }
maintenance = { status = "actively-developed" }
github = { repository = "pest-parser/pest" }
1 change: 1 addition & 0 deletions debugger/_README.md

0 comments on commit be98cfc

Please sign in to comment.