-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* feature: added a `pest_debugger` crate (fixes #98) 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. Co-authored-by: Tomas Tauber <[email protected]> Co-authored-by: Dragoș Tiselice <[email protected]>
- Loading branch information
1 parent
0ba8386
commit 8c602d8
Showing
18 changed files
with
943 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
[workspace] | ||
members = [ | ||
"bootstrap", | ||
"debugger", | ||
"derive", | ||
"generator", | ||
"grammars", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
comment: off | ||
|
||
ignore: | ||
- debugger/src/main.rs | ||
- derive/src/lib.rs | ||
- pest/examples/parens.rs | ||
- pest/src/unicode/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[package] | ||
name = "pest_debugger" | ||
description = "pest grammar debugger" | ||
version = "2.5.0" | ||
edition = "2021" | ||
authors = ["Dragoș Tiselice <[email protected]>", "Tomas Tauber <[email protected]>"] | ||
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" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../README.md |
Oops, something went wrong.