From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Janneke Nieuwenhuizen Newsgroups: gmane.lisp.guile.devel Subject: [PATCH v2 0/5] Extend PEG for production use. Date: Mon, 14 Oct 2024 09:26:38 +0200 Organization: AvatarAcademy.nl Message-ID: <87seszdu1d.fsf@gnu.org> References: <874ksmio6b.fsf@verum.com> 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="3201"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Ekaitz Zarraga To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Mon Oct 14 09:27:24 2024 Return-path: Envelope-to: guile-devel@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 1t0FUA-0000ad-Mn for guile-devel@m.gmane-mx.org; Mon, 14 Oct 2024 09:27:22 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t0FTl-0007Ak-6p; Mon, 14 Oct 2024 03:26:57 -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 1t0FTi-00079l-9g for guile-devel@gnu.org; Mon, 14 Oct 2024 03:26:54 -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 1t0FTd-0006kh-R2; Mon, 14 Oct 2024 03:26:50 -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=sx7Z6Tmm4UsEHQxtzlauSbN92cTdEOpSRkKnj26yloA=; b=PKUh86kjQhIA4qnVIm4E pjk6mUeEQ3aotjnGtNkNHxuRLx2k8XonFKD9+AcQofBcUmPEDlpVuKg8qQ3UUqm/FG0uZdPCwM+uR fUCFiDrK65Iv7I0HIMRTOad47kfAy8YZfvxAH0UCTzfT/zIp8YiO2WoCAuRFjit1E+PKT3gExw3Hl 0r/fNpmI9Y/qU0KwABk/fi2r7NnsYRC0cdXWSJzW6ABdisBXBt/68WpYpVIvKZLZXyph49UNGXBUw V/RDn9A9UcDRa2osvoRd6+4FfLcB0LQvWDtJjANJLGg+EbdiHKOtJtZIU7sF7ciXmpjxDiaeN8uLv EyRAksb7zO92gA==; In-Reply-To: <874ksmio6b.fsf@verum.com> (Rutger van Beusekom's message of "Mon, 11 May 2020 15:41:48 +0200") Original-cc: Rutger van Beusekom X-Url: http://AvatarAcademy.nl X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22731 Archived-At: Rutger van Beusekom writes: > First of all, I am aware I am submitting a sizeable patch here, and I am > happy to break it up if necessary. As Ekaitz has been doing some great PEG work and it seems that there's some renewed interest in PEG, please find a newer version of this patch as a broken-up patch set and rebased on latest main. It features: * debug tracing, for debugging of grammar * expectation parser, for (syntax) error reporting * parameterize'able whitespace and comment skip parsing * preserving of location information * fall-back parsing, for parsing incomplete texts We've been using these extensions in Dezyne (https://dezyne.org) for some years now. For your pulling convenience, also here https://gitlab.com/janneke/guile/-/commits/wip-peg Greetings, Janneke Rutger van Beusekom (5): Remove trailing whitespace in PEG texinfo. peg: Add debug tracing. peg: Add expect. peg: Add whitespace and comment skip parsers. peg: Add fall-back parsing. doc/ref/api-peg.texi | 143 ++++++++++++++++---- module/ice-9/peg.scm | 11 +- module/ice-9/peg/codegen.scm | 231 +++++++++++++++++++++++++------- module/ice-9/peg/string-peg.scm | 12 +- test-suite/tests/peg.test | 141 +++++++++++++++++-- 5 files changed, 453 insertions(+), 85 deletions(-) --=20 Janneke Nieuwenhuizen | GNU LilyPond https://LilyPond.org Freelance IT https://www.JoyOfSource.com | Avatar=C2=AE https://AvatarAcade= my.com