From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ekaitz Zarraga Newsgroups: gmane.lisp.guile.devel Subject: Re: [PATCH v2 5/5] peg: Add fall-back parsing. Date: Fri, 18 Oct 2024 11:58:43 +0200 Message-ID: <7e884397-15b9-4938-a1d8-2713f1d29ad2@elenq.tech> References: <87seszdu1d.fsf@gnu.org> <20241014073109.19774-1-janneke@gnu.org> <20241014073109.19774-5-janneke@gnu.org> <87iktvdtkr.fsf@gnu.org> <4c1b640b-41f8-4d74-9889-1c1d69a845be@elenq.tech> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36741"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Rutger van Beusekom To: Rutger van Beusekom , Janneke Nieuwenhuizen , "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Fri Oct 18 11:59:17 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 1t1jlK-0009N4-UK for guile-devel@m.gmane-mx.org; Fri, 18 Oct 2024 11:59:15 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t1jl3-0004kB-9W; Fri, 18 Oct 2024 05:58: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 1t1jl1-0004k0-Bd for guile-devel@gnu.org; Fri, 18 Oct 2024 05:58:55 -0400 Original-Received: from dane.soverin.net ([185.233.34.150]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t1jkw-0003Hx-SQ; Fri, 18 Oct 2024 05:58:55 -0400 Original-Received: from smtp.soverin.net (unknown [10.10.4.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dane.soverin.net (Postfix) with ESMTPS id 4XVKsc2QR6zJL; Fri, 18 Oct 2024 09:58:44 +0000 (UTC) Original-Received: from smtp.soverin.net (smtp.soverin.net [10.10.4.99]) by soverin.net (Postfix) with ESMTPSA id 4XVKsb5lvDz5r; Fri, 18 Oct 2024 09:58:43 +0000 (UTC) Authentication-Results: smtp.soverin.net; dkim=pass (2048-bit key; unprotected) header.d=elenq.tech header.i=@elenq.tech header.a=rsa-sha256 header.s=soverin1 header.b=vbXWFdtu; dkim-atps=neutral DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=elenq.tech; s=soverin1; t=1729245524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=Q6FcofiIVdkOeeev5HzME/CNgRLRLCBwXgNmOa2AwG4=; b=vbXWFdtu+vCO9kd8vhcf+isUGCXzCRzM6VlwNfI6BkAPMhiajFIjx2tj0BPAZp4yzBYJIM cTN9eZgvzB3k2jRI2gCMIk3Wg2RDIoMTUwnLMqeygWK5dgEFTbuvXGzeyiRanhYqArvXMn myGUgGYTQMsgnErpBpbMafnC1nMlkseMUh4vb1VLy5N1Zn/6iWzvcmcSSQVmErD0CZ6xUM jFCiTpenPhV9PYZfuLbVgoN0LgJnk85mH/LRuu7beU5vntFMHv7Qpj2YPKeZwxrO/Jcff7 zu6nsfeOA9AmJLU01bfkVpszJY6bofMeA/z3DO3vtLm3GNjvAO+hz8zDMguJbQ== Content-Language: en-US, es-ES, eu Autocrypt: addr=ekaitz@elenq.tech; keydata= xsFNBGViSyIBEADY3g71uW/0CVaVm5/ObqTicQXXJRuh1uafIFiUUZoAp1V3V89b3LZ/m0cL 8YNHxTxsx8sKIMYTGlOvARAMiSpDvkmpf5pLn5T7+VvK90FOv/Pkp1tNNT+tvd0m/7C58+39 s7tN+XppbjVRtFuSXY0aFe8rpivZsKxv+tPUHUnQQszXvwgx0GQl8AX99IE+j75NJmBHFVg2 0geKa7QVymu669ix2+zU8vGoOKf5nIS0qG1m/vrtwR3ZuuyWX9/E/uP95ahX5ETWtjhTDbEm MEaRperwbczBewkdERJ34vRrverqKQA1xHXoPsx4NkLMocORFSSCJsveXcgWlU+pUIOYcKUA ARJjHhoWoUH4LZt5EOb7U17AaYMmATUXPCqq8G3jEXq6i0O1J1obCJGIRG02R9GiGp4zrVuv 2hmyoAmed4xYZAtf9WjcbwiunDkMGIxscdSlfEH/9dt7PGdEvkZ0dNSCTbp4ctMI4jAfobAL LReMSGx1CgPi01J61a/n/SgR66AiRJZCyC1u2V7AK1rBOAYzOU4UoePz+yF1I7crjZWAQVo6 DlmmXW+29l/lh2oK5jOuNEcvI6qi+tPCYxpDhUhZeYgqFU+/xgGlMj/XGvwuIFlpVg9ovFMg 6mxskOCVP9xNEp/qHiHqByYu5NRcITo/z/3BUimdXTT4KSq2cQARAQABzSJFa2FpdHogWmFy cmFnYSA8ZWthaXR6QGVsZW5xLnRlY2g+wsGOBBMBCAA4FiEEg/pnRVjAUpRlfkwZt5lM+Jly CyYFAmViSyICGwMFCwkIBwIGFQoJCAsCBBYCAwECH In-Reply-To: X-Spampanel-Class: ham Received-SPF: pass client-ip=185.233.34.150; envelope-from=ekaitz@elenq.tech; helo=dane.soverin.net X-Spam_score_int: -40 X-Spam_score: -4.1 X-Spam_bar: ---- X-Spam_report: (-4.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-1.277, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:22741 Archived-At: Hi On 2024-10-16 08:44, Rutger van Beusekom wrote: > *Subject:* Re: [PATCH v2 5/5] peg: Add fall-back parsing. > Hi Ekaitz, > > > I think this change is not compatible with the PEG syntax. In PEG # is a > > line comment: > > I am not attached to # as the PEG expect operator.  At the same time the > expect operator is not part of https://bford.info/pub/lang/peg.pdf > . I think > we should consider choosing another name for the expect operator, do you > have a suggestion Ekaitz? > > I was considering "reusing" the she-bang, i.e. #!, since the expect operator > throws an exception, but Janneke pointed out that ! as a modifier on the # > comment is not very intuitive and I tend to agree. My suggestion is to try to be closer to what PEG/LEG does simply because it's a very famous library: https://www.piumarta.com/software/peg/peg.1.html In any case, we should and probably must diverge from it a little bit in order to be compatible with our constructs. For example, that one supports (patter), {action} and that we might not be able to replicate. My idea is to continue its line as long as it's useful for us, but when it's not we can just diverge from the parts that we don't like. I'm wondering if this fallback mechanism could fit in one of the constructs of PEG that the library supports. If it doesn't, we could just go with @ or % signs or anything like that. If it does, we could just follow what the library does. WDYT?