From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.lisp.guile.user Subject: sxml-match bad pattern syntax Date: Tue, 28 Dec 2021 01:21:31 -0500 Message-ID: <87h7atdzbo.fsf@gnuvola.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9705"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Dec 28 07:22:52 2021 Return-path: Envelope-to: guile-user@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 1n25so-0002Ge-Mu for guile-user@m.gmane-mx.org; Tue, 28 Dec 2021 07:22:51 +0100 Original-Received: from localhost ([::1]:45066 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n25sm-00020S-Nr for guile-user@m.gmane-mx.org; Tue, 28 Dec 2021 01:22:48 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57258) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n25rs-0001ye-34 for guile-user@gnu.org; Tue, 28 Dec 2021 01:21:53 -0500 Original-Received: from delivery.mailspamprotection.com ([185.56.84.23]:56043) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n25ro-0000tt-RE for guile-user@gnu.org; Tue, 28 Dec 2021 01:21:50 -0500 Original-Received: from 241.110.209.35.bc.googleusercontent.com ([35.209.110.241] helo=giow1035.siteground.us) by se25.mailspamprotection.com with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1n25rj-0004xE-Ow for guile-user@gnu.org; Tue, 28 Dec 2021 00:21:45 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnuvola.org ; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=rgIBFc6ghbiW0KrNFQloiYmR5XIObKrxUGDAmlFjzj0=; b=GAaBUMc2+Qnag0xJst32PdOomg WOHMQA0OuTr0Ge6Jc6DpFN1KhKIlhhB8Dv8d7M0Ygc2AICFawy7BkCHpEWVYGMu701kEeWq4xsLpX sw7jhxDO4xobfRISf6JXCOI3hTfkmFEB1Lv4IGfaF0N+zF4spix9bX1qFiaD+SKZy5iQ=; Original-Received: from [50.89.166.226] (port=39292 helo=abolire) by giow1035.siteground.us with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.90-.1) (envelope-from ) id 1n25rj-0000dB-C4 for guile-user@gnu.org; Tue, 28 Dec 2021 06:21:43 +0000 X-Originating-IP: 35.209.110.241 X-SpamExperts-Domain: giow1035.siteground.us X-SpamExperts-Username: 35.209.110.241 Authentication-Results: mailspamprotection.com; auth=pass smtp.auth=35.209.110.241@giow1035.siteground.us X-SpamExperts-Outgoing-Class: ham X-SpamExperts-Outgoing-Evidence: Combined (0.21) X-Recommended-Action: accept X-Filter-ID: Pt3MvcO5N4iKaDQ5O6lkdGlMVN6RH8bjRMzItlySaT+4ljRucwm3QHkl8LOBI8X/PUtbdvnXkggZ 3YnVId/Y5jcf0yeVQAvfjHznO7+bT5wLhre8Rs9A7VGcCqK8bn0qbA/nwrcN5XO9vX75jP2nU2Qn TISYUaueFmULB1TZE+7ilbHtbFYVmmyNP/jzd7CCzPgfBgZM0FjuQW6Y55dUiQZmnW/XN+tohdLu D74c7RIjp6w6C9uhW4b49q7wR4OIg8CBO1Snvm6qXHQp7O9kdWAwBanT9Qk0FP009riVwhiWBs2x H2ECFB9jy+mqDrXyzO11BRKqT8B4uLrn7iz8uvLBMzbIQcSG8L0jOzL80Q1MxDcqDeEvahfPkDkT lH91LgaQnmF8H6pa6B8MTK1lii9jyCbkXtEuyOnFV02lgfrmIJFSU6hi7nfgXGmjAulQMgrYfgAZ Zb04/OubpB2EQv2o1X92Cn4UU9JJ17dQkS7izDj4VfLGYhV5rU4pWppWNkfi8i3qCVlWxapaS/oL VM7UZB5DjZsjTnYAKJBt0QYHqlOp8L8bz1V+J+CU4gJ92+mjZSBX08/Qa05JAIPdanoSKlHMxVnk urBPHtW+f1JZBGKGpZFwJprvIwY1weIqdADEgzRHsT0YO1C0kjJqTEzc1ZcbuwKBQk8+lBEw5E6i sEnUqNZLrUlvyn2GrmywkDzLsegeIf5jR5PNTlF6RW+yRxkmeaL6EFcZnyRV4RDujwN5vAr2fQEN gxhN/KmvgWDJyQhGvT8x+8ZryF6sGWKvFVT8sOEeyl3l/+Pi0yQ9nWPDJiphAOkUAkv9H/DmUQWD 8ZUl6W6GbLVSRWNFEr/SVY5/aOEWx X-Report-Abuse-To: spam@quarantine1.mailspamprotection.com Received-SPF: pass client-ip=185.56.84.23; envelope-from=ttn@gnuvola.org; helo=delivery.mailspamprotection.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.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_MSPIKE_BL=0.001, RCVD_IN_MSPIKE_L5=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:17916 Archived-At: --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable In an effort to join the current millennium, i have started to play w/ Guile 2.x's SXML facilities. Good stuff! I've run into a problem, however, and hope i can get help resolving it here. The following small program attempts to use =E2=80=98sxml-match=E2=80=99 to remove an unwanted attribute from a (well-formed) SXML snippet. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=UNBOGUS #!/usr/bin/guile -s !# (use-modules (sxml match)) (define (unbogus x) (sxml-match x ((a (@ . ,attrs) ...) `(a (@ ,@(delete '(shape "rect") attrs)) ...)))) (define bad '(a (@ (shape "rect") (href "foo.html")) "kid")) (pk bad) (pk (unbogus bad)) ;; expect: (a (@ (href "foo.html")) "kid") --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable When i run it, i see it fail w/ error message: sxml/sxml-match.ss:342:31: Throw to key `sxml-match-error' with args `(#f "bad pattern syntax (symbol not allowed in this context)" [...] (output folded and truncated). To my untrained eye, the form looks similar to the examples in Info node =E2=80=98(guile) sxml-match=E2= =80=99 but evidently i am missing something. What? =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (query) ; (2021) Software Libero (pcase (context query) ; =3D Dissenso Etico (`(technical ,ml) (correctp ml)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iG4EARECAC4WIQR0jqDoHLinSJv6bORnAyIkTIB1AgUCYcqs7hAcdHRuQGdudXZv bGEub3JnAAoJEGcDIiRMgHUC5dgAnjSW+EJm39hh6j7zkzShCPLGdMshAKClCpDn Q757z6Y8n1IVAjN41X4mjA== =mHVf -----END PGP SIGNATURE----- --==-=-=--