From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Matt Wette Newsgroups: gmane.lisp.guile.user Subject: Re: [ANN] nyacc 0.80.4 released Date: Wed, 2 Aug 2017 05:22:03 -0700 Message-ID: <521B54ED-14CD-430D-A109-E9DEAA3DA798@gmail.com> References: <67259F80-7E60-4717-A178-712D18585138@gmail.com> <87d18fypqd.fsf@gnu.org> <85FC89DE-29B4-4364-9EC9-3A1ADDD4C57C@gmail.com> <878tj2zgo6.fsf@gnu.org> <70EB26F7-B52B-4E4D-9CDE-D5CA7803E7EC@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1501676560 12749 195.159.176.226 (2 Aug 2017 12:22:40 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 2 Aug 2017 12:22:40 +0000 (UTC) Cc: Guile User To: Matt Wette Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Wed Aug 02 14:22:35 2017 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dcsfX-0002tm-T1 for guile-user@m.gmane.org; Wed, 02 Aug 2017 14:22:32 +0200 Original-Received: from localhost ([::1]:47574 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcsfd-0004ag-QY for guile-user@m.gmane.org; Wed, 02 Aug 2017 08:22:37 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44070) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcsfH-0004aX-I7 for guile-user@gnu.org; Wed, 02 Aug 2017 08:22:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcsfF-0008U3-1c for guile-user@gnu.org; Wed, 02 Aug 2017 08:22:15 -0400 Original-Received: from mail-pg0-x22b.google.com ([2607:f8b0:400e:c05::22b]:37858) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcsf9-0008MD-Rv; Wed, 02 Aug 2017 08:22:08 -0400 Original-Received: by mail-pg0-x22b.google.com with SMTP id y129so20540836pgy.4; Wed, 02 Aug 2017 05:22:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f5KO2BszlLjCd2Wy8bh0PfjtEXmusEH+vGCBQZE13GU=; b=Y6YCW5zhPCpMrxkf0qKuo47oMhKVTs1LJpWGZnOJsmtksw/QmpT92IFGcvEQ1ciVph 1SKeGEzPx78kPcNUofMOedhsqO8vLzrrOTxnA4LBnyV8ixUWmVFFQurNzfoygeaKF91j mDUeHRckTfq2iFMdE/7iUMxP7Tu+f/lTh+ldUQMV9NPapUFw0W4/d79YByNqjlXvR0CD NCaay+z0UzvAl0hSJhWv39V/LS2tNp+ahf8fg3cEUsN8EMXMW+6rjFG9AH125XtZvyuR JX6jfBUmcBAafRg2sfecS1AFP7QhcqOrgJh5ghvB6ke+hyKWBawi82FKTmYPf9zqeoU+ kRSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=f5KO2BszlLjCd2Wy8bh0PfjtEXmusEH+vGCBQZE13GU=; b=pLbXr9wPvGpuEY7w4I5dMGbZ4uP3QYL6uA5qKVj/9AsJl3o42CW8q0qeAE0RlDn7Fj fT2/re3yY22m6kSx+bfsAb4Ktxo0tJwioxJVVbrQ2XyjOoWcs9Eab9tXduz1vp+ivK5+ rJXSH7/MD7Vk10tmGLXM/kZuMbt1VMYigism5JHexgq5cKKpQoDRUF7ZhEFxs5406obi jKhpM2ipcaNsIf6NZptHI7Ery9NQMqffyFVN83zfNw7dJnLepvXOUc3QX3LCFcmbros+ Oml8oLYoIDd120qGZ56/uvxQJ30JGjlx7bZf5s75My+cL1GI7AvuSC3dc2wGT/T7rEB3 bsqw== X-Gm-Message-State: AIVw111UgEUKjvXVKDz1TJFdF1WomDXKffRl8lIlf7RojaAEQ/Y6Ie2z 2PMuIqzsQ6WUew== X-Received: by 10.84.236.2 with SMTP id q2mr24268927plk.86.1501676526682; Wed, 02 Aug 2017 05:22:06 -0700 (PDT) Original-Received: from nautilus.championbroadband.com (216-165-236-44.championbroadband.com. [216.165.236.44]) by smtp.gmail.com with ESMTPSA id 10sm64864751pfo.134.2017.08.02.05.22.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Aug 2017 05:22:06 -0700 (PDT) In-Reply-To: <70EB26F7-B52B-4E4D-9CDE-D5CA7803E7EC@gmail.com> X-Mailer: Apple Mail (2.3273) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22b X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14012 Archived-At: > On Aug 2, 2017, at 5:13 AM, Matt Wette wrote: >=20 >=20 >> On Aug 1, 2017, at 10:23 PM, Jan Nieuwenhuizen = wrote: >>=20 >> Matt Wette writes: >>=20 >>> Thanks for the reports. I am happy to see the severity in bugs = reducing. >>=20 >> Yes! >>=20 >>> For the FFI-helper I need to parse the rat=E2=80=99s nest under = /usr/include >>> so I am catching more. >>=20 >> Hah :-) >>=20 >>> I am not sure what you are getting at here. If I have >>> char *s =3D =E2=80=9Cfoo\0bar=E2=80=9D; >>> then the tree is >>> (trans-unit >>> (decl (decl-spec-list (type-spec (fixed-type "char"))) >>> (init-declr-list >>> (init-declr >>> (ptr-declr (pointer) (ident "s")) >>> (initzer (p-expr (string "foo\x00bar"))))))) >>> so the null character makes it into the tree. The tree language is = SXML so this should be a=20 >>> legal Scheme string, which I think it is. See = http://dl.acm.org/citation.cfm?doid=3D571727.571736. >>=20 >> Hmm, weird are you using my null.c? Here's what I get >>=20 >> --8<---------------cut here---------------start------------->8--- >> 07:18:50 janneke@dundal:~/src/nyacc [env] >> $ guile >> GNU Guile 2.2.2 >> Copyright (C) 1995-2017 Free Software Foundation, Inc. >>=20 >> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'. >> This program is free software, and you are welcome to redistribute it >> under certain conditions; type `,show c' for details. >>=20 >> Enter `,help' for help. >> scheme@(guile-user)> (use-modules (nyacc lalr)) >> scheme@(guile-user)> *nyacc-version* >> $1 =3D "0.80.4" >> scheme@(guile-user)> (use-modules (nyacc lang c99 parser)) >> scheme@(guile-user)> (with-input-from-file "null.c" parse-c99) >> $2 =3D (trans-unit (decl (decl-spec-list (type-spec (fixed-type = "char"))) (init-declr-list (init-declr (ptr-declr (pointer) (ident "s")) = (initzer (p-expr (string "foo0bar"))))))) >> scheme@(guile-user)>=20 >> --8<---------------cut here---------------end--------------->8--- >>=20 >>=20 >>> Look for fixes to above, along with some (minor) changes in c99 = output, in 0.81.0. >>=20 >> Thanks! >>=20 >> Greetings, >> janneke >>=20 >> --=20 >> Jan Nieuwenhuizen | GNU LilyPond = http://lilypond.org >> Freelance IT http://JoyofSource.com | Avatar=C2=AE = http://AvatarAcademy.com >=20 > You are right. If I use the string parser it parses correctly. If I = use the file parser it does not.=20 > I need to check this out. And I found it. Thanks. =E2=80=94 Mtt @@ -244,8 +244,8 @@ ((#\v) (cons #\vtab cl)) ((#\x) (cons (integer->char (read-hex ch)) cl)) (else - (if (char-numeric? ch) - (cons (integer->char (read-oct ch)) cl) + (if (char-numeric? c1) + (cons (integer->char (read-oct c1)) cl) (cons c1 cl)))) (read-char)))) ((eq? ch #\") (cons '$string (lxlsr cl)))