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