From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Newsgroups: gmane.lisp.guile.bugs Subject: bug#73188: PEG parser does not support full PEG grammar Date: Mon, 14 Oct 2024 13:56:04 +0200 Message-ID: <875xpu3nl7.fsf@gnu.org> References: <78a81bc5-cd0d-0506-185b-c733c66e96ae@elenq.tech> <20240912205751.23724-1-ekaitz@elenq.tech> <87cyk3rbkc.fsf_-_@gnu.org> <168e01eb-ac58-4d39-a960-46624e65edde@elenq.tech> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="30192"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 73188@debbugs.gnu.org To: Ekaitz Zarraga Original-X-From: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Mon Oct 14 14:41:42 2024 Return-path: Envelope-to: guile-bugs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1t0KOM-0007e6-0R for guile-bugs@m.gmane-mx.org; Mon, 14 Oct 2024 14:41:42 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0KNU-0001kV-CK; Mon, 14 Oct 2024 08:40:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0KNS-0001js-Jp for bug-guile@gnu.org; Mon, 14 Oct 2024 08:40:46 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t0KNS-00041c-Ad for bug-guile@gnu.org; Mon, 14 Oct 2024 08:40:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=I+mKB1ktfU3wo7pvr9Jtb1dS3j8qTIRsbQUOYXLAsdI=; b=FhncrHjGYB/nKyuEG4uG0g8/vh/A1ThFA6QNublKnmpYS6WHn+KSBxBpdbsnaLyM7TfKK/xrlOgjrKrTM5g+LuhQ9qqUb/+QyXtRbWz4DRZldbMLrwb3c7GaNymRQ1JKlVmH8JVqq4qtFhwamZ67ADO/SD74RA8hMr9iZJJJ3qNWs1DtqmYQ4Xgd9Ttm5Q6VYMFc90vi14PV/30Ngxs1RbYhPocnusnmlDHCXqoFlY5CRbey1/r/V1cfyaHX4MXxnNauUnBTO5ETomUXtW+R4OxRUvmKnmVEOSawy4WMQ4QIpS7WbswcCX1sbXD4NXRGzho9eKx990qsjGgnMEja3g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t0KNj-0008W1-1K for bug-guile@gnu.org; Mon, 14 Oct 2024 08:41:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 14 Oct 2024 12:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 73188 X-GNU-PR-Package: guile Original-Received: via spool by 73188-submit@debbugs.gnu.org id=B73188.172890962132301 (code B ref 73188); Mon, 14 Oct 2024 12:41:02 +0000 Original-Received: (at 73188) by debbugs.gnu.org; 14 Oct 2024 12:40:21 +0000 Original-Received: from localhost ([127.0.0.1]:37031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0KN3-0008OI-49 for submit@debbugs.gnu.org; Mon, 14 Oct 2024 08:40:21 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:57660) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t0Jgc-0004th-Bq for 73188@debbugs.gnu.org; Mon, 14 Oct 2024 07:56:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t0JgF-0006Tb-6W; Mon, 14 Oct 2024 07:56:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=I+mKB1ktfU3wo7pvr9Jtb1dS3j8qTIRsbQUOYXLAsdI=; b=p6gyjujVl5MbZgJkN8JQ Y3u+qEchHMlHXGf6vAoWUpUJ9Xr+ZwQ/vRMs8j4c1dOoEu57RSyGk7Wps3mpo6ysbV/8KW4Az9tBb 2hQG10WPBp2yfvKlXszdRBkABoQkMT/7KExZom2jjr7/76RvjmF7ItUKc66CJfDKTqQxD+EctEAGc 6SpI4MwvUQKgFqSzbfEAyAqxAMXNajQ/tBFXh+E7su92LWkBmFs3NfzHX84Q0ON8BV8txLPML4P0a 8lzCTyOsf47UPi7mewLySZlu8usmi2k3FlOibDbEEa7XXbZV/UKcdgqIYr6wCctb/X5vcInW2mX1m WdGDjfO7H8YLng==; In-Reply-To: <168e01eb-ac58-4d39-a960-46624e65edde@elenq.tech> (Ekaitz Zarraga's message of "Sun, 13 Oct 2024 22:59:22 +0200") X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Tridi 23 =?UTF-8?Q?Vend=C3=A9miaire?= an 233 de la =?UTF-8?Q?R=C3=A9volution,?= jour du Navet X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.bugs:11037 Archived-At: Saluton! Ekaitz Zarraga skribis: > On 2024-10-13 22:29, Ludovic Court=C3=A8s wrote: >> Hi Ekaitz, >> Ekaitz Zarraga skribis: [...] >>> It adds support for the missing features (comments, underscores in >>> identifiers and escaping) while keeping the extensions (dashes in >>> identifiers, < and <--). >>> >>> The naming system tries to be as close as possible to the one proposed >>> in the paper. >>> >>> * module/ice-9/peg/string-peg.scm: Rewrite PEG parser. >>> * test-suite/tests/peg.test: Fix import [...] >> 1. Is the name change for lexical elements (camel case instead of >> lower-case + hyphens) user-visible? I guess no but better be safe >> than sorry. > > I think they can be, in a very weird way. If using `peg-as-peg` or > something they can be used, but the ones coming from the PEG in text, > which makes way more sense written like in the paper. I'm not sure if > there's another way to make them available, but I don't think there > is. > > I exported `Grammar` as `peg-grammar` because of this. So the users > should just use `peg-grammar` for their things. Sounds good. As long as we don=E2=80=99t unwillingly introduce API incompatibilities, that is fine. >> 2. Could you add tests for the missing features that this adds, and >> maybe extend =E2=80=98api-peg.texi=E2=80=99 accordingly too? > > It doesn't really add much new in this first case, but it makes it > work as expected in PEG, which is what documentation already claimed > to do, and the code didn't actually implement. Mostly what this commit > adds is escaping support in the PEG string literals. I was referring to the features mentioned in the commit log, namely comments, underscores in identifiers, and escaping. >> 3. You can choose to assign copyright to the FSF or to not do that=C2= =B9. >> In the latter case, please add a copyright line for you where >> appropriate. > > I don't care (maybe I should?). I just want this to work properly. So, copyright line I guess. :-) Thanks, Ludo=E2=80=99.