unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Helmut Eller <eller.helmut@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 72131@debbugs.gnu.org, Jeff Trull <edaskel@att.net>,
	Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#72131: 29.3; peg.el: syntax class character for symbol is '_', not 's'
Date: Tue, 16 Jul 2024 15:00:41 +0200	[thread overview]
Message-ID: <87ikx5xzie.fsf@gmail.com> (raw)
In-Reply-To: <86bk2xir3q.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 16 Jul 2024 13:11:21 +0300")

On Tue, Jul 16 2024, Eli Zaretskii wrote:

>> From: Jeff Trull <edaskel@att.net>
>> Date: Mon, 15 Jul 2024 15:26:02 -0700
>> 
>> (require 'peg)
>> (with-temp-buffer
>>   (save-excursion (insert "_"))
>>   (peg-parse (syntax-class symbol)))
>> 
>> results in the message
>> "No merge-error method for: (syntax-class symbol)".
>> 
>> The root cause seems to be line 703 of peg.el where the syntax class
>> characters are defined. peg uses "s" for symbols instead of
>> "_". Correcting this results in a successful parse in the given code.
>
> Stefan and Helmut, any comments or suggestions?

Yes, looks like "_" would the correct.  A method like

 (cl-defmethod peg--merge-error (merged (_ (eql syntax-class)) x)
   (cl-adjoin `(syntax-class ,x) merged :test #'equal))

is also missing and error messages like

  peg-signal-failure: Parse error at %d (expecting %S): 1, ("abc")

don't look right either.

The first thing to do would be to write a test.





  reply	other threads:[~2024-07-16 13:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAF_DUeHay19Ji-K=4f9cTYeRvauJYMup5xsJhT1BU8oW13fFXw.ref@mail.gmail.com>
2024-07-15 22:26 ` bug#72131: 29.3; peg.el: syntax class character for symbol is '_', not 's' Jeff Trull
2024-07-16 10:11   ` Eli Zaretskii
2024-07-16 13:00     ` Helmut Eller [this message]
2024-07-16 13:04     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-07-20  8:55       ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ikx5xzie.fsf@gmail.com \
    --to=eller.helmut@gmail.com \
    --cc=72131@debbugs.gnu.org \
    --cc=edaskel@att.net \
    --cc=eliz@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).