unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke@gnu.org>
To: Matt Wette <matt.wette@gmail.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: [ANN] nyacc 0.80.4 released
Date: Tue, 01 Aug 2017 22:53:14 +0200	[thread overview]
Message-ID: <87d18fypqd.fsf@gnu.org> (raw)
In-Reply-To: <67259F80-7E60-4717-A178-712D18585138@gmail.com> (Matt Wette's message of "Fri, 28 Jul 2017 16:47:04 -0700")

[-- Attachment #1: Type: text/plain, Size: 972 bytes --]

Matt Wette writes:

> NYACC version 0.80.4 is released 
>
> This is a bug-fix release, to fix several bugs discovered by janneke.  Thanks Jan.
> 1) C parser not parsing “0ULL” as numeric; fixed.
> 2) #undef FOO not working; fixed;
> 3) struct foo { …} => (struct-def (ident (“foo”))… ; fixed: => (struct-def (ident “foo”) …
> 4) C pre-processor argument reading dropping characters 

Yay, thanks again!

Meanwhile, rain1 and I found two bugs.  First is not really a bug, debug
printing while parsing \xXX.  Do

    (with-input-from-file "x00.c" parse-c99)

with x00.c:

    char *s = "\x66\x6f\x6f\x20";

see patch attached.

The others is parsing of "\0", see null.c.  Instead of a null character
(or possibly literally "\0") we get an ascii 0 (without backslash).

Not sure what we want here, if "\0" passes through literally, the
compiler will need to parse strings again and change those to null?

Greetings,
janneke


[-- Attachment #2: x00.c --]
[-- Type: application/octet-stream, Size: 59 bytes --]

char *s = "\x66\x6f\x6f\x20";

int
main ()
{
  puts (s);
}

[-- Attachment #3: 0001-typo-fix-parsing-of-xXX.patch --]
[-- Type: text/x-patch, Size: 937 bytes --]

From aa97207497b1d290734d04accf019caa4e854796 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 1 Aug 2017 19:39:25 +0200
Subject: [PATCH] typo: fix parsing of \xXX

* module/nyacc/lex.scm (read-hex): Comment-out debug printing.
---
 module/nyacc/lex.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/nyacc/lex.scm b/module/nyacc/lex.scm
index 2a4d28a..3636738 100644
--- a/module/nyacc/lex.scm
+++ b/module/nyacc/lex.scm
@@ -206,7 +206,7 @@
 	(cs:lhx (string->char-set "abcdef")))
     (lambda (ch) ;; ch == #\x always
       (let iter ((cv 0) (ch (read-char)) (n 0))
-	(simple-format #t "ch=~S\n" ch)
+	;;(simple-format #t "ch=~S\n" ch)
 	(cond
 	 ((eof-object? ch) cv)
 	 ((> n 2) (unread-char ch) cv)
-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


[-- Attachment #4: null.c --]
[-- Type: application/octet-stream, Size: 24 bytes --]

char *s = "foo\0bar";



[-- Attachment #5: Type: text/plain, Size: 152 bytes --]


-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

  reply	other threads:[~2017-08-01 20:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-28 23:47 [ANN] nyacc 0.80.4 released Matt Wette
2017-08-01 20:53 ` Jan Nieuwenhuizen [this message]
2017-08-01 23:10   ` Matt Wette
2017-08-02  5:23     ` Jan Nieuwenhuizen
2017-08-02 12:13       ` Matt Wette
2017-08-02 12:22         ` Matt Wette
2017-08-04 10:31           ` Jan Nieuwenhuizen
2017-08-04 17:38       ` Matt Wette

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d18fypqd.fsf@gnu.org \
    --to=janneke@gnu.org \
    --cc=guile-user@gnu.org \
    --cc=matt.wette@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).