From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Volf <~@wolfsden.cz> Newsgroups: gmane.lisp.guile.user Subject: Re: PEG tutorial example doesnt work Date: Tue, 13 Aug 2024 01:38:01 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XRRtdtUK8W07yLZQ" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21057"; mail-complaints-to="usenet@ciao.gmane.io" Cc: guile-user@gnu.org To: Diego Antonio Rosario Palomino Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Tue Aug 13 01:38:57 2024 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 1sdecr-0005JQ-I6 for guile-user@m.gmane-mx.org; Tue, 13 Aug 2024 01:38:57 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdecA-0007dG-MG; Mon, 12 Aug 2024 19:38:14 -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 <~@wolfsden.cz>) id 1sdec8-0007cq-70 for guile-user@gnu.org; Mon, 12 Aug 2024 19:38:12 -0400 Original-Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <~@wolfsden.cz>) id 1sdec4-0006xx-FP for guile-user@gnu.org; Mon, 12 Aug 2024 19:38:11 -0400 Original-Received: by wolfsden.cz (Postfix, from userid 104) id CDEC42A8A91; Mon, 12 Aug 2024 23:38:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723505883; bh=YbKpklm8Sc3RAA43KN2aSsoBvzgA2K2edPZ6W5t4olE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=k9+6KtbE+siLekeiSizgaI6l+GclGVEd57oJvcvTQuXDaJfO+tqQqFrjoZZltq3WD 3/8BruF2vXWZHkr6rqjMPc5dEfSFeIpSqXrlt61HnOL/2q0bO3noLAkgcV9QW85F2J 052sN4G6Y2bpp+PDWtVCXfkNJkcxz6DzWLcx4X4JTV+Rg6GGB16r/Z2ccNHIyI49U/ 1cTUeb+A3cWKgbj9P+cjOJO+6CF/P/9PgGw081IiA/dF7SqQB05VNzHyjt6FmtEGVS T7LQv5q1NY13ekqhlaW7VTM1rTwUw0Fk2G5cB8zQiK2oLqXcyFnZCs9c5hgzR6TCpb nHqrOUyGl1K0jGAg70cfZEhkTUu7PLOrA/Sdj/Jgnm8+dl0pLgtMaS0CWNmpBtv5lQ WQjdnayCldenSi+Jpx825RB6iNM6w1aeUYO+R4L0bX+JvDKFPEQ8963tfxMjIiKgWV RbOMLGdAIz0kuXfIVSv4UL9lhfe5muxE4UzB2Hg4CeaQ6CLE3deZYOgrEbBpJYn1nr 0iF5WcMWEpe4dITyOVKXmqMI8fINL39HX9AbwN+iikcmirjbHm4C4rvVPFQxLHd8SI c/j53KQSd1YPhJObR8WPuXFRD0radnuNTQU/wtM0Aa2msARcZ9xS92DCVQ2Owgsknw 4+vuJubUDySQPUbsELTIAb7E= Original-Received: from localhost (unknown [193.32.127.156]) by wolfsden.cz (Postfix) with ESMTPSA id D041C2A80C3; Mon, 12 Aug 2024 23:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1723505882; bh=YbKpklm8Sc3RAA43KN2aSsoBvzgA2K2edPZ6W5t4olE=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=efJSlikqjy+QV2hGftwbjoROBOclXhQ5EB27H6yS3FC7k2yqUr4Y6TTGD4QYcxJn9 qCyD7dSuiLex+MQ04S65YXqmfALiptfBIgtiYcqzaX4glG5wTygeJGl8hjCJOkdy08 v4/LddxVGivCYvZXC3zpMleVYlbyqkBgOPR3Nfzeh1F9McbvEkveFlXd5NxN5qTPea n5le/VEVvYMAAkkVafUoVoGOIyClmleXrDbMjyZX9MeFRjynIbaLrA/nVXMJhwdhjU ZrWy5RUKiWgVAisAXG3XQA76q/Fu2fgXtMIMzwBcteSnRgxIEaNJ8l9inBewyIRW37 d+I3uRO4RQ6hciVwGT31ar8fsovE+qqivwau84Ry6BjOC4HElIGxjQfFQ1tdgpwZSy SQ4pJJMd9R2oiGw3ibzZZfjBPT5lW/YjSoY7o76uX1QD+dNSVCLhtxU+UQa6YIQz5u YJbcVUghltDP09cRnOKak3UxJ4MZ/EXYFh7gmDEuyhxRrSfYA5j086AV+Ob97O1iUY YHYAPWGvteMlrjC1IhhN5I+5A5ul4059kDOB5p3kYhoLCJ9tAjOvhpVOwx6TXdCZ9t 2VnJW9gQph/GGAC05eikKGTviSxe+bU6DMiUFuYa/fKL3KkJfgG1OMVRHsb1OoWkD2 rWeE1lXah9E0HUiib9Q+/muQ= Mail-Followup-To: Diego Antonio Rosario Palomino , guile-user@gnu.org Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=37.205.8.62; envelope-from=~@wolfsden.cz; helo=wolfsden.cz 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_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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-bounces+guile-user=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.user:19757 Archived-At: --XRRtdtUK8W07yLZQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello, On 2024-08-11 21:52:42 -0500, Diego Antonio Rosario Palomino wrote: > Hello, i am a new scheme user trying to exploit the peg library but have > encountered the following error : > > guile c.scm > ;;; note: source file /home/diego/Documents/Guile/c.scm > ;;; newer than compiled > /home/diego/.cache/guile/ccache/3.0-LE-8-4.6/home/diego/Documents/Guile/c= =2Escm.go > ;;; note: auto-compilation is enabled, set GUILEAUTO_COMPILE=3D0 > ;;; or pass the --no-auto-compile argument to disable. > ;;; compiling /home/diego/Documents/Guile/c.scm > ;;; /home/diego/Documents/Guile/c.scm:20:57: warning: possibly unbound > variable `=E2=87=92' > ;;; compiled > /home/diego/.cache/guile/ccache/3.0-LE-8-4.6/home/diego/Documents/Guile/c= =2Escm.go > Backtrace: > In ice-9/boot-9.scm: > 1752:10 6 (with-exception-handler #:unwind? # ) > In unknown file: > 5 (apply-smob/0 #) > In ice-9/boot-9.scm: > 724:2 4 (call-with-prompt #) > In ice-9/eval.scm: > 619:8 3 ( #(#(#))) > In ice-9/boot-9.scm: > 2836:4 2 (save-module-excursion ) > 4388:12 1 () > In /home/diego/Documents/Guile/c.scm: > 20:57 0 (_) > > /home/diego/Documents/Guile/c.scm:20:57: Unbound variable: =E2=87=92 The arrow character in the documentation is a stand in meaning that A retur= ns B. So in this example: (match-pattern cfunc "int square(int a) { return a*a;}") =E2=87=92 (32 (cfunc (ctype "int") (cname "square") (cargs (carg (ctype "int") (cname "a"))) (cbody (cstatement "return a*a")))) It means that (match-pattern cfunc "int square(int a) { return a*a;}") Returns this value: (32 (cfunc (ctype "int") (cname "square") (cargs (carg (ctype "int") (cname "a"))) (cbody (cstatement "return a*a")))) This is used fairly commonly across Scheme info pages, so it is good thing = to know. Hope this helps, Tomas -- There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --XRRtdtUK8W07yLZQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAma6nNkACgkQL7/ufbZ/ waljqA/+ICXdGFKe3m32RBqJ7NEmlpE2kckWM4FwsEOFW/xHd40oabEr7QqwDwsY Vd0V1Wg7V1K7a267P9WsokJYJL8+hJWFMiBY8gAziypqpMH6MdLrQOSi/6yIs6ax GbylzGwTV81t1ITIUoi48aA5cJtYvo1SWhqd7yhFkhhhIm6t/+5dsz54rVbMV3Fg IUvn9ycdEjIIN/x6zRPWvgPhbeZXL4oxkm+9RFN3KJFi30nHzPo7J+9yb5Lm/qSv W4vwq28hmi2rbIlaVWuFUQW039EFwpHK9bNdQTQdsNFmxFlQK34NEgSzEdMnAYKD vuOsthPczccQaZgn7vkzEIXahQDywsEU9RIBEeV91/E0ViYtGPRv45FXUQ5xQQxU gDTQJMKae13nKTxtKV6geN09vQLP/duyqoXCZeVwIAhbFiT4vBSHpO8G6Wy6pKls w9RKy2wG13tN6z9LhzA1STucZdlyBoMg26pKo7830OABFwmG+af8kKbeHcDPSMLj 848qDVDDlpN03ywJpEgchuUsKh3uhLxpY949r2xPcgZ+kTPa0O4VGFniei49rZvo UE93MtBijAlzOJnj39VVj3+0w/CVm4TGpNZjqW/NedAKoqXK/vK/W6B5rmGQNWYX 1D78F5KIZiK8jIpKrrhlfEke3X7a72P0sDEu3Zs4F6TXFjb+/Ck= =Npnz -----END PGP SIGNATURE----- --XRRtdtUK8W07yLZQ--