GNU bug report logs -
#74018
31.0.50; Issue with define-peg-ruleset?
Previous Next
Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>
Date: Fri, 25 Oct 2024 20:32:02 UTC
Severity: normal
Found in version 31.0.50
Done: Stefan Monnier <monnier <at> iro.umontreal.ca>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Cc: monnier <at> iro.umontreal.ca
> Date: Fri, 25 Oct 2024 16:30:30 -0400
> From: Stefan Monnier via "Bug reports for GNU Emacs,
> the Swiss army knife of text editors" <bug-gnu-emacs <at> gnu.org>
>
> Version: 31.0.50
^^^^^^^
Given what you say below, this is inaccurate.
> Augusto pointed out a bug in `peg.el` when you have code like:
>
> (define-peg-ruleset myrules
> (sign () (or "+" "-" ""))
> (digit () [0-9])
> (nat () digit (* digit))
> (int () sign digit (* digit))
> (float () int "." nat))
>
> (with-peg-rules
> (myrules
> (complex float "+i" float))
> (peg-parse nat "," nat "," complex) )
>
> where the macroexpanded code is wrong and leads to errors like:
>
> Debugger entered--Lisp error: (void-function peg-rule\ nat)
>
> I was about to install the bugfix below to `master` but noticed that it
> probably belongs to `emacs-30` instead since the bug makes
> `define-peg-ruleset` basically unusable and PEG is new in Emacs-30.
>
> Any objection?
I know nothing about peg.el, and you haven't explained the root cause
for the bug for me to understand why it "makes `define-peg-ruleset'
basically unusable", so let's hear from Stefan and Andrea first.
This bug report was last modified 207 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.