Subject: bug#76555: closed (Re: bug#76555: 30.1; PEG's doc needs some correction)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 27 Mar 2025 01:07:03 +0000

Your bug report

#76555: 30.1; PEG's doc needs some correction

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
76555: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=76555
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#76555: 30.1; PEG's doc needs some correction
From: Stefan Monnier <[email-masked]>
To: "Yue Yi" <[email-masked]>
Cc: Eric Abrahamsen <[email-masked]>, 76555 <[email-masked]>, Stefan Kangas <[email-masked]>
Date: Wed, 26 Mar 2025 21:06:31 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

> Thanks, three commits :p

And that's because I caught a first problem before the first push!
Otherwise it would have been 4 commits!  <eye-roll>
I really outdid myself.

        Stefan

Subject: 30.1; PEG's doc needs some correction
From: "Yue Yi" <[email-masked]>
To: "bug-gnu-emacs" <[email-masked]>
Date: Tue, 25 Feb 2025 22:52:22 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Hello Emacs, As we know, Emacs 30 introduced a PEG implementation, peg.el. I found that the following code doesn't work properly when reading the PEG documentation with folks: -------------- code from lispref/peg.texi ------------------------- (define-peg-rule digit ()   [0-9]) (define-peg-ruleset number-grammar         '((number sign digit (* digit))           digit  ;; A reference to the definition above.           (sign (or "+" "-" "")))) ------------------------------------------------------------------- We noticed that the correct usage of this macro is provided in peg.el. --------------code from peg.el ------------------------------------ ;;;; Named rulesets: ;; ;; You can define a set of rules for later use with: ;; ;;     (define-peg-ruleset myrules ;;       (sign  () (or "+" "-" "")) ;;       (digit () [0-9]) ;;       (nat   () digit (* digit)) ;;       (int   () sign digit (* digit)) ;;       (float () int "." nat)) ------------------------------------------------------------------- Perhaps we can correct the errors in the documentation through a simple replacement.  Regards, Yue Yi