From 4c27150c57eb05630e3907c8619139dfaa8e0728 Mon Sep 17 00:00:00 2001 From: pompolic <pompolic@special-circumstanc.es> Date: Fri, 12 Nov 2021 21:36:58 +0100 Subject: [PATCH] Clarify hammer-parse-step documentation --- gdb-port/README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gdb-port/README.md b/gdb-port/README.md index d357280..c76c0f4 100644 --- a/gdb-port/README.md +++ b/gdb-port/README.md @@ -49,17 +49,19 @@ H_RULE(b, h_sequence(b_2, b_2, NULL)); H_RULE(a_b, h_sequence(a, b, NULL)); ``` -Stopping at `a_b` and invoking the command will stop at the applications of the following parsers: +Stopping at `a_b` and invoking the command 4 times will stop at the applications of the following parsers: ``` a, b, b_2, b_2 ``` -Invoking `hammer-parse-step 2` would result in the following list: +Stopping at `a_b` and invoking `hammer-parse-step 2` two times would result in the following list: ``` b, b_2 ``` +(Skipping over `a` and `b_2` once.) + This is not equivalent to advancing the input stream by `[number]` bytes, rather, it is equivalent to running until the next `[number]` pushes on the parser stack. See also `hammer-parser-backtrace`. If the GDB parameter "hammer-extended-parse-step-info" is set to "on", it will also invoke hammer-parser-backtrace and hammer-parser-preview-input. -- GitLab