From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpout01-ext2.partage.renater.fr (smtpout01-ext2.partage.renater.fr [194.254.240.33]) by sourceware.org (Postfix) with ESMTPS id EB3F03858D1E for ; Tue, 14 May 2024 07:48:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org EB3F03858D1E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oca.eu Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oca.eu ARC-Filter: OpenARC Filter v1.0.0 sourceware.org EB3F03858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=194.254.240.33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715672942; cv=none; b=OBUUpEJxtgZkKvJohNGy3TGIh3G6BmPLIpNRFJjSUK6EkaWJtkzUcshUSJJYMNLX1Uf0PmVpI6XWSjo/AgVp7hnS05GdIqHyqwoXUVW+ncMj/Mhdmcveo+kCQ1EAsvrLpEPNHOUAhd+QeoYm8+qIPnAnsLxZzcQ1nmQmiSzVW8I= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1715672942; c=relaxed/simple; bh=wtN82c7qYOhS4N+lX+h/HbKP5qP6VulLdFSlUsDJFto=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=Yu0QWGxbmIh0of+JQaB3LiOxzDLWe3bmxZBV55tIdhSt1gnlkih6wbPu25zKdUIVeEsdlJHnzX08f0HXSNdDuD6S5bm65A+QlfUveHcs+7tFH/xc5sJLvqd3DecY+C9o0aSy/CO4bfeI4vFsj4nXdqpKi0jm7u5JEVwcdk1Iptc= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from zmtaauth01.partage.renater.fr (zmtaauth01.partage.renater.fr [194.254.240.25]) by smtpout10.partage.renater.fr (Postfix) with ESMTP id D39626350D for ; Tue, 14 May 2024 09:48:56 +0200 (CEST) Received: from zmtaauth01.partage.renater.fr (localhost [127.0.0.1]) by zmtaauth01.partage.renater.fr (Postfix) with ESMTPS id CBC30140039 for ; Tue, 14 May 2024 09:48:56 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by zmtaauth01.partage.renater.fr (Postfix) with ESMTP id BC47114008C for ; Tue, 14 May 2024 09:48:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.10.3 zmtaauth01.partage.renater.fr BC47114008C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oca.eu; s=51688159-7048-4452-88B4-FE5A10886D87; t=1715672936; bh=wtN82c7qYOhS4N+lX+h/HbKP5qP6VulLdFSlUsDJFto=; h=Message-ID:Date:MIME-Version:To:From; b=QZCwy4bV+R6ZVRpsQ+e4Zs/ONBr1xFnjwrlFHqqqvQPnIXrIRv2G89GFankLwkOHd Yco470QLanqKyYU0c82B/BJskmfiX/46d4W/5rHwKYg2FRiRsfqwMl2Oi6Jh6/HWBt DXIwMFVIkwrn5Tpvb01Rd+wmoE1aIkl5OChF+WXGLeFQ8O47o1Pn+fM7Kq7evbOpog bD3Mxjok2EuJWZen0BXf1G5sxAfResFUou9NIBtx9/g1sBHn8uA8T+igO9wwpdGQ0d UPZW6Zwzxr//hNuicDLgwMXbMzwkCjLflExn6QhLdX4U2FQCe2cwNHvetRkcFjbpLS 5oAW+jtpbAfmA== Received: from zmtaauth01.partage.renater.fr ([127.0.0.1]) by localhost (zmtaauth01.partage.renater.fr [127.0.0.1]) (amavis, port 10026) with ESMTP id niVhvv1Byosr for ; Tue, 14 May 2024 09:48:56 +0200 (CEST) Received: from [192.168.1.12] (unknown [194.254.241.250]) by zmtaauth01.partage.renater.fr (Postfix) with ESMTPA id 7AFAE140039 for ; Tue, 14 May 2024 09:48:56 +0200 (CEST) Message-ID: Date: Tue, 14 May 2024 09:48:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Reply-To: Damien.MATTEI@univ-cotedazur.fr Subject: Re: syntax? in kawa/scheme To: kawa@sourceware.org References: <36548656-ba14-441d-8467-1e08f6e83194@oca.eu> <217f6a16-554d-4723-b792-d1ff16893b15@bothner.com> Content-Language: fr From: Damien Mattei In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed X-Virus-Scanned: clamav-milter 0.103.8 at clamav04 X-Virus-Status: Clean X-Renater-Ptge-SpamState: clean X-Renater-Ptge-SpamScore: 0 X-Renater-Ptge-SpamCause: gggruggvucftvghtrhhoucdtuddrgedvledrvdeghedgudduiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucftgffptefvgfftnecuuegrihhlohhuthemuceftddtnecunecujfgurhepkfffgggfrhfuvfhfhfgjtgfgsehtkeertddtvdejnecuhfhrohhmpeffrghmihgvnhcuofgrthhtvghiuceouggrmhhivghnrdhmrghtthgvihesohgtrgdrvghuqeenucggtffrrghtthgvrhhnpeehhefgfffgtdfgjeefffeitdekvdfggfevhfdtuedtgedvueeiudejfefhkeduveenucfkphepudelgedrvdehgedrvdeguddrvdehtdenuceurggutfgvphhuthfgmhgrihhlpegrsghushgvsehunhhivhdqtghothgvuggriihurhdrfhhrnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepudelgedrvdehgedrvdeguddrvdehtddphhgvlhhopegludelvddrudeikedruddruddvngdpmhgrihhlfhhrohhmpegurghmihgvnhdrmhgrthhtvghisehotggrrdgvuhdpnhgspghrtghpthhtohepuddprhgtphhtthhopehkrgifrgesshhouhhrtggvfigrrhgvrdhorhhg Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: but in fact testing the string representation is enought for me as i=20 need only to test for operators such as #'* #'+.... indeed only Racket has a good syntax? procedure: Welcome to DrRacket, version 8.12 [cs]. Language: racket, with debugging; memory limit: 8192 MB. > (syntax? #'(2 * 3)) #t someone answered me about syntax? for Guile being in (system syntax) but=20 it works well only on atomic expression: scheme@(guile-user)> (use-modules (system syntax)) scheme@(guile-user)> syntax? $1 =3D # scheme@(guile-user)> (syntax? #'(2 * 3)) $2 =3D #f this is not the good result (above) as: scheme@(guile-user)> #'(2 * 3) $3 =3D (# #=20 #) scheme@(guile-user)> (syntax? #'*) $4 =3D #t scheme@(guile-user)> (syntax? *) $6 =3D #f but if someone explain me how to=C2=A0 'check if an object implements=20 kawa.lang.SyntaxForm' i can do that? perheaps with an exception.... Damien Le 14/05/2024 =C3=A0 00:20, Damien Mattei a =C3=A9crit=C2=A0: > Ce message provient d=E2=80=99un exp=C3=A9diteur externe =C3=A0 l=E2=80= =99universit=C3=A9 (adresse :=20 > kawa-bounces+damien.mattei=3Dunice.fr@sourceware.org). Ne cliquez pas=20 > sur les liens et n=E2=80=99ouvrez pas les pi=C3=A8ces jointes si vous n= e connaissez=20 > pas l=E2=80=99exp=C3=A9diteur ou que vous n=E2=80=99=C3=AAtes pas s=C3=BB= r du contenu. En cas de=20 > doute, merci de transf=C3=A9rer le mail =C3=A0 abuse@univ-cotedazur.fr > > i modify a SRFI 105=C2=A0 curly infix parser to move some function towa= rds=20 > macro, then to pre-parse the code on the fly at the pre-compil stage=20 > of the macro,then use the pre-parsed code in the expansion phase.=20 > Finally the run-time execution of the generated code will be faster as=20 > no parsing will be done at this run-time phase. (exmple : a mathematic=20 > formula is known and will not change at run-time ,the infix to prefix=20 > operator precedence algorithm can be applied before runtime) . Prior i=20 > parsed s-expr now it will be syntax expression, the logic is the same=20 > but the code will change, instead of procedure or quoted procedures or=20 > form it will be syntax objects. For the operator precedence i need to=20 > be able to compare equality of some operator in a syntaxic form (like=20 > #'*, #'+ etc...) I admit as there is no native curly-infix srfi 105 in=20 > kawa it is already done by a parser in command line. (this more easy=20 > in Guile but very few scheme implement SRFI 105 anyway so i will reuse=20 > this code in the future) > > Le 13/05/2024 =C3=A0 23:47, Per Bothner a =C3=A9crit=C2=A0: >> Ce message provient d=E2=80=99un exp=C3=A9diteur externe =C3=A0 l=E2=80= =99universit=C3=A9 (adresse :=20 >> per@bothner.com). Ne cliquez pas sur les liens et n=E2=80=99ouvrez pas= les=20 >> pi=C3=A8ces jointes si vous ne connaissez pas l=E2=80=99exp=C3=A9diteu= r ou que vous=20 >> n=E2=80=99=C3=AAtes pas s=C3=BBr du contenu. En cas de doute, merci de= transf=C3=A9rer le=20 >> mail =C3=A0 abuse@univ-cotedazur.fr >> >> >> On 5/13/24 1:36 PM, Damien Mattei wrote: >>> but in fact my problem is to test equality for 2 syntax object and i=20 >>> can not use equal? : >> >> Why? What are you actually trying to do?