add documentation for PUSH_LITERAL#58
Conversation
WalkthroughThe changes introduce the Changes
Sequence Diagram(s)sequenceDiagram
participant P as Parser
participant G as Grammar Engine
participant S as Stack
P->>G: Process input with rule containing PUSH_LITERAL("literal")
G->>S: Push "literal" onto the stack (non-consuming match)
S-->>G: Acknowledgement of push
G-->>P: Continue parsing without consuming input
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
src/grammars/syntax.md
Outdated
| @@ -452,8 +452,8 @@ pest_derive = { version = "2.7", features = ["grammar-extras"] } | |||
| ## The stack (WIP) | |||
There was a problem hiding this comment.
maybe, it doesn't need to be marked WIP if it's completed with these docs: https://github.com/pest-parser/pest/blob/master/pest/src/lib.rs#L266 ?
There was a problem hiding this comment.
Hm, PEEK especially has fairly intricate behavior with its ranges. I'm not sure how much this book is meant to be a high/mid-level tutorial, vs down in the details; put another way, I'm not sure what the distinction is been the book and the libs.rs docs, and how one decides what information goes where.
There was a problem hiding this comment.
this "syntax" section tries to be an overview, so it'd be good to at least mention it; the specific high/mid-level tutorial could be added later
There was a problem hiding this comment.
I added some more text about the various operators, and updated the title to remove the "WIP" tag. (Note that that also causes the URL anchor text to change.)
See pest-parser/pest#1092
Summary by CodeRabbit
New Features
PUSH_LITERAL, that allows literal text to be added to a stack during parsing. This enhancement increases flexibility when matching paired delimiters.Documentation
PUSH_LITERALfor improved grammar definitions and clarified the functionality of theDROPkeyword.