guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] nyacc 0.80.4 released


From: Matt Wette
Subject: Re: [ANN] nyacc 0.80.4 released
Date: Wed, 2 Aug 2017 05:13:43 -0700

> On Aug 1, 2017, at 10:23 PM, Jan Nieuwenhuizen <address@hidden> wrote:
> 
> Matt Wette writes:
> 
>> Thanks for the reports.  I am happy to see the severity in bugs reducing.
> 
> Yes!
> 
>> For the FFI-helper I need to parse the rat’s nest under /usr/include
>> so I am catching more.
> 
> Hah :-)
> 
>> I am not sure what you are getting at here.  If I have
>>      char *s = “foo\0bar”;
>> 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 
>> legal Scheme string, which I think it is.  See 
>> http://dl.acm.org/citation.cfm?doid=571727.571736.
> 
> Hmm, weird are you using my null.c?  Here's what I get
> 
> --8<---------------cut here---------------start------------->8---
> 07:18:50 address@hidden:~/src/nyacc [env]
> $ guile
> GNU Guile 2.2.2
> Copyright (C) 1995-2017 Free Software Foundation, Inc.
> 
> 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.
> 
> Enter `,help' for help.
> scheme@(guile-user)> (use-modules (nyacc lalr))
> scheme@(guile-user)> *nyacc-version*
> $1 = "0.80.4"
> scheme@(guile-user)> (use-modules (nyacc lang c99 parser))
> scheme@(guile-user)> (with-input-from-file "null.c" parse-c99)
> $2 = (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)> 
> --8<---------------cut here---------------end--------------->8---
> 
> 
>> Look for fixes to above, along with some (minor) changes in c99 output, in 
>> 0.81.0.
> 
> Thanks!
> 
> Greetings,
> janneke
> 
> -- 
> Jan Nieuwenhuizen <address@hidden> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com 
> <http://avataracademy.com/>

You are right.  If I use the string parser it parses correctly.  If I use the 
file parser it does not. 
I need to check this out.

Matt




reply via email to

[Prev in Thread] Current Thread [Next in Thread]