On 2024-10-14 09:36, Janneke Nieuwenhuizen wrote:
Janneke Nieuwenhuizen writes:
From: Rutger van Beusekom
This allows production of incomplete parse trees, without errors, e.g.,
for code completion.
* module/ice-9/peg/codegen.scm (%peg:fall-back?): New exported
parameter.
(%enable-expect, %c
Janneke Nieuwenhuizen writes:
> From: Rutger van Beusekom
>
> This allows production of incomplete parse trees, without errors, e.g.,
> for code completion.
>
> * module/ice-9/peg/codegen.scm (%peg:fall-back?): New exported
> parameter.
> (%enable-expect, %continuation, %final-continuation): New
From: Rutger van Beusekom
* doc/ref/api-peg.texi (PEG API Reference): Remove trailing whitespace.
---
doc/ref/api-peg.texi | 46 ++--
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/doc/ref/api-peg.texi b/doc/ref/api-peg.texi
index d34ddc64
From: Rutger van Beusekom
* module/ice-9/peg/codegen.scm (trace?): New function.
(indent): New variable.
(%peg:debug?): New exported parameter.
(wrap-parser-for-users): Use them to provide debug tracing.
* test-suite/tests/peg.test ("Parse tracing"): Test it.
* doc/ref/api-peg.texi (Debug tracing
From: Rutger van Beusekom
This adds an expectation parser (expect a, 'a#') to the PEG parser
grammar.
Rationale: PEG will return #f for invalid input. Adding expect (#)
to the grammar is a way to report syntax errors.
* module/ice-9/peg/string-peg.scm (peg-secondary->defn): Rename from
peg-pri
From: Rutger van Beusekom
* module/ice-9/peg/codegen.scm: (%peg:locations?, %peg:skip?): New
exported parameters.
(wrap-parser-for-users): Use them to enable skip parsing and switch
having locations on comments and whitespace.
* test-suite/tests/peg.test ("Skip parser"): Test it.
* doc/ref/api-pe
From: Rutger van Beusekom
This allows production of incomplete parse trees, without errors, e.g.,
for code completion.
* module/ice-9/peg/codegen.scm (%peg:fall-back?): New exported
parameter.
(%enable-expect, %continuation, %final-continuation): New parameter.
(final-continuation): New function
Rutger van Beusekom writes:
> First of all, I am aware I am submitting a sizeable patch here, and I am
> happy to break it up if necessary.
As Ekaitz has been doing some great PEG work and it seems that there's
some renewed interest in PEG, please find a newer version of this patch
as a broken-up