unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
* [ANN] nyacc 0.82.2 is released
@ 2017-11-11 17:19 Matt Wette
  2017-11-11 18:37 ` [ANN] nyacc 0.82.3 " Matt Wette
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-11-11 17:19 UTC (permalink / raw)
  To: Guile User Mailing List

I have released nyacc version 0.82.2.

1) I fixed, once again, def-bwl.c bug, I hope.  (Incorrectly added (cons repl used) to 
   rerun expand-cpp-macro-ref near bottom of cpp.scm.)
2) I reworked the ugly printer a bit.
3) I made ff-helper macros hygienic (i.e., datum->syntax is no longer used).
4) I made misc updates to the (experimental) ffi-helper -- many bugs fixed, news ones added :)

In examples/nyacc/lang/c99 is a program gtkdemo.scm, that I got to actually work using 
modules glib, gtk2+, gobject, pango ... that were all generated by the ffi helper.  
With this milestone complete, I am taking a little break.

NYACC, for Not Yet Another Compiler Compiler!, is set of guile modules for
generating parsers and lexical analyzers.  It also provides sample parsers
and pretty-printers using SXML trees as an intermediate representation.

NYACC maturity is beta level.

NYACC is free software; the full source distribution is available through

tarball repository:
    https://download.savannah.gnu.org/releases/nyacc/

git repository:
    git://git.savannah.nongnu.org/nyacc.git

home page, project page, user's guide:
    http://www.nongnu.org/nyacc
    https://savannah.nongnu.org/projects/nyacc


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ANN] nyacc 0.82.3 is released
  2017-11-11 17:19 [ANN] nyacc 0.82.2 is released Matt Wette
@ 2017-11-11 18:37 ` Matt Wette
  2017-11-11 19:53   ` Jan Nieuwenhuizen
  2017-11-11 22:03   ` [ANN] nyacc 0.82.4 " Matt Wette
  0 siblings, 2 replies; 13+ messages in thread
From: Matt Wette @ 2017-11-11 18:37 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List


> On Nov 11, 2017, at 9:19 AM, Matt Wette <matt.wette@gmail.com> wrote:
> 
> I have released nyacc version 0.82.2.
> 

0.82.3 released to fix bug in modules/Makefile.nyacc






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANN] nyacc 0.82.3 is released
  2017-11-11 18:37 ` [ANN] nyacc 0.82.3 " Matt Wette
@ 2017-11-11 19:53   ` Jan Nieuwenhuizen
  2017-11-11 19:59     ` Jan Nieuwenhuizen
  2017-11-11 20:00     ` Matt Wette
  2017-11-11 22:03   ` [ANN] nyacc 0.82.4 " Matt Wette
  1 sibling, 2 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-11 19:53 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List

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

Matt Wette writes:

> 0.82.3 released to fix bug in modules/Makefile.nyacc

Thanks!  I narrowed another tcc parse bug down, see attached foo.c

(use-modules (nyacc lang c99 parser))
(with-input-from-file "foo.c" parse-c99)
foo.c:22: parse failed at state 203, on input "i"
foo.c:22: C99 parse error
$51 = #f

This works with 0.80.4.

Thanks for all the good work,
jannneke


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

#define USE_FOO 1

#ifndef USE_FOO

#else /* USE_FOO */

typedef int foo;

#endif /* USE_FOO */

#ifdef USE_FOO
typedef int foo;
#endif

#if defined (USE_FOO)
typedef int foo;
#endif

int
main ()
{
  foo i;
  return 0;
}

[-- Attachment #3: 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANN] nyacc 0.82.3 is released
  2017-11-11 19:53   ` Jan Nieuwenhuizen
@ 2017-11-11 19:59     ` Jan Nieuwenhuizen
  2017-11-11 20:00     ` Matt Wette
  1 sibling, 0 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-11 19:59 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List

Jan Nieuwenhuizen writes:

> This works with 0.80.4.

To be clear: only _one_ of the #if clauses should be present, of course.
Just testing here that none work.

> #define USE_FOO 1
>
> #ifndef USE_FOO
>
> #else /* USE_FOO */
>
> typedef int foo;
>
> #endif /* USE_FOO */
>
> #ifdef USE_FOO
> typedef int foo;
> #endif
>
> #if defined (USE_FOO)
> typedef int foo;
> #endif
>
> int
> main ()
> {
>   foo i;
>   return 0;
> }

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: [ANN] nyacc 0.82.3 is released
  2017-11-11 19:53   ` Jan Nieuwenhuizen
  2017-11-11 19:59     ` Jan Nieuwenhuizen
@ 2017-11-11 20:00     ` Matt Wette
  1 sibling, 0 replies; 13+ messages in thread
From: Matt Wette @ 2017-11-11 20:00 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: Guile User Mailing List


> On Nov 11, 2017, at 11:53 AM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
> 
> Matt Wette writes:
> 
>> 0.82.3 released to fix bug in modules/Makefile.nyacc
> 
> Thanks!  I narrowed another tcc parse bug down, see attached foo.c
> 
> (use-modules (nyacc lang c99 parser))
> (with-input-from-file "foo.c" parse-c99)
> foo.c:22: parse failed at state 203, on input "i"
> foo.c:22: C99 parse error
> $51 = #f
> 
> This works with 0.80.4.
> 
> Thanks for all the good work,
> jannneke
> 
> <foo.c>
> -- 
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com

Thanks.  Nice job of narrowing that down.  That looks like more CPP ugliness.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* [ANN] nyacc 0.82.4 is released
  2017-11-11 18:37 ` [ANN] nyacc 0.82.3 " Matt Wette
  2017-11-11 19:53   ` Jan Nieuwenhuizen
@ 2017-11-11 22:03   ` Matt Wette
  2017-11-23  2:11     ` fix for c99dev string escape char read Jan Nieuwenhuizen
  1 sibling, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-11-11 22:03 UTC (permalink / raw)
  To: Guile User Mailing List


> On Nov 11, 2017, at 10:37 AM, Matt Wette <matt.wette@gmail.com> wrote:
> 
> 
>> On Nov 11, 2017, at 9:19 AM, Matt Wette <matt.wette@gmail.com> wrote:
>> 
>> I have released nyacc version 0.82.2.
>> 
> 
> 0.82.3 released to fix bug in modules/Makefile.nyacc

0.82.4 released to fix bugs in CPP, chlit reader, and c99 pretty-printer. 

Thanks to janneke for isolating those bugs.



^ permalink raw reply	[flat|nested] 13+ messages in thread

* fix for c99dev string escape char read
  2017-11-11 22:03   ` [ANN] nyacc 0.82.4 " Matt Wette
@ 2017-11-23  2:11     ` Jan Nieuwenhuizen
  2017-11-23  3:28       ` Matt Wette
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-23  2:11 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List

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

Hi Matt,

Working with guile-2.0.14 (soon 2.0.9) on your recent c99dev branch I
need attached patch.

So, guile-2.0 resurrected, yay!

Thanks,
janneke


[-- Attachment #2: 0001-resurrect-reading-of.patch --]
[-- Type: text/x-patch, Size: 1130 bytes --]

From 0bb330c0c5c6d9298884dfecd0185e2520bb3267 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Thu, 23 Nov 2017 03:05:45 +0100
Subject: [PATCH] resurrect reading of '\'' '\\' '\'' '\"' '\?' '\|'.

* module/nyacc/lex.scm (read-c-chlit): in read-esc-char, accept string
  (#\\ #\' #\" #\? #\|) too.
---
 module/nyacc/lex.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/nyacc/lex.scm b/module/nyacc/lex.scm
index c3e3e9b..17b8b03 100644
--- a/module/nyacc/lex.scm
+++ b/module/nyacc/lex.scm
@@ -290,7 +290,8 @@
 	((#\r) "\r")		   ; return U+000D
 	((#\0) (string (integer->char (read-oct)))) ; octal
 	((#\x) (string (integer->char (read-hex)))) ; hex
-	(else (error "bad escape sequence")))))
+        ((#\\ #\' #\" #\? #\|) (string c2))
+	(else (error (format #f "bad escape sequence: ~s" c2))))))
   (define (wchar t)
     (case t ((#\L) '$chlit/L) ((#\u) '$chlit/u) ((#\U) '$chlit/U)))
   (cond
-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com


[-- Attachment #3: 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

^ permalink raw reply related	[flat|nested] 13+ messages in thread

* Re: fix for c99dev string escape char read
  2017-11-23  2:11     ` fix for c99dev string escape char read Jan Nieuwenhuizen
@ 2017-11-23  3:28       ` Matt Wette
  2017-11-23  5:43         ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-11-23  3:28 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: Guile User Mailing List


> On Nov 22, 2017, at 6:11 PM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
> 
> Hi Matt,
> 
> Working with guile-2.0.14 (soon 2.0.9) on your recent c99dev branch I
> need attached patch.
> 
> So, guile-2.0 resurrected, yay!

But there will be issues with 2.0in general  since, IIRC, SRFI-43 is in guile-2.0.13 but not guile-2.0.11,
or something to that order.  I don't know how far you want to go with the backward compatability.






^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: fix for c99dev string escape char read
  2017-11-23  3:28       ` Matt Wette
@ 2017-11-23  5:43         ` Jan Nieuwenhuizen
  2017-11-23  7:02           ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-23  5:43 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List

Matt Wette writes:

>> So, guile-2.0 resurrected, yay!
>
> But there will be issues with 2.0in general  since, IIRC, SRFI-43 is in guile-2.0.13 but not guile-2.0.11,
> or something to that order.  I don't know how far you want to go with the backward compatability.

For now I'm happy; we'll see.  srfi-43 can easily be injected from
stable-2.0 as far as I'm concerned.

thanks!
janneke

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: fix for c99dev string escape char read
  2017-11-23  5:43         ` Jan Nieuwenhuizen
@ 2017-11-23  7:02           ` Jan Nieuwenhuizen
  2017-11-23 14:45             ` Matt Wette
  0 siblings, 1 reply; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-23  7:02 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List

Jan Nieuwenhuizen writes:

> For now I'm happy; we'll see.

Still happy, found a bug though; on c99dev plus my previous patch this happens

--8<---------------cut here---------------start------------->8---
(use-modules (nyacc lang c99 parser) (ice-9 pretty-print))
(pretty-print (with-input-from-string "#define ELF \"\\177ELF\"\nchar *a = ELF;" parse-c99))

=>

(trans-unit
  (decl (decl-spec-list (type-spec (fixed-type "char")))
        (init-declr-list
          (init-declr
            (ptr-declr (pointer) (ident "a"))
            (initzer (p-expr (string "177ELF")))))))
--8<---------------cut here---------------end--------------->8---

master (correctly) gives

   ... (p-expr (string "\x7fELF"))

janneke

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: fix for c99dev string escape char read
  2017-11-23  7:02           ` Jan Nieuwenhuizen
@ 2017-11-23 14:45             ` Matt Wette
  2017-11-23 15:04               ` Matt Wette
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-11-23 14:45 UTC (permalink / raw)
  To: Jan Nieuwenhuizen; +Cc: Guile User Mailing List


> On Nov 22, 2017, at 11:02 PM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
> 
> Jan Nieuwenhuizen writes:
> 
>> For now I'm happy; we'll see.
> 
> Still happy, found a bug though; on c99dev plus my previous patch this happens
> 
> --8<---------------cut here---------------start------------->8---
> (use-modules (nyacc lang c99 parser) (ice-9 pretty-print))
> (pretty-print (with-input-from-string "#define ELF \"\\177ELF\"\nchar *a = ELF;" parse-c99))
> 
> =>
> 
> (trans-unit
>  (decl (decl-spec-list (type-spec (fixed-type "char")))
>        (init-declr-list
>          (init-declr
>            (ptr-declr (pointer) (ident "a"))
>            (initzer (p-expr (string "177ELF")))))))
> --8<---------------cut here---------------end--------------->8---
> 
> master (correctly) gives
> 
>   ... (p-expr (string "\x7fELF"))
> 
> janneke
> 
> -- 
> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
> 


Right.  I thought octals had to start with 0.  I will fix.


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: fix for c99dev string escape char read
  2017-11-23 14:45             ` Matt Wette
@ 2017-11-23 15:04               ` Matt Wette
  2017-11-23 15:14                 ` Jan Nieuwenhuizen
  0 siblings, 1 reply; 13+ messages in thread
From: Matt Wette @ 2017-11-23 15:04 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List


> On Nov 23, 2017, at 6:45 AM, Matt Wette <matt.wette@gmail.com> wrote:
> 
> 
>> On Nov 22, 2017, at 11:02 PM, Jan Nieuwenhuizen <janneke@gnu.org> wrote:
>> 
>> Jan Nieuwenhuizen writes:
>> 
>>> For now I'm happy; we'll see.
>> 
>> Still happy, found a bug though; on c99dev plus my previous patch this happens
>> 
>> --8<---------------cut here---------------start------------->8---
>> (use-modules (nyacc lang c99 parser) (ice-9 pretty-print))
>> (pretty-print (with-input-from-string "#define ELF \"\\177ELF\"\nchar *a = ELF;" parse-c99))
>> 
>> =>
>> 
>> (trans-unit
>> (decl (decl-spec-list (type-spec (fixed-type "char")))
>>       (init-declr-list
>>         (init-declr
>>           (ptr-declr (pointer) (ident "a"))
>>           (initzer (p-expr (string "177ELF")))))))
>> --8<---------------cut here---------------end--------------->8---
>> 
>> master (correctly) gives
>> 
>>  ... (p-expr (string "\x7fELF"))
>> 
>> janneke
>> 
>> -- 
>> Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
>> Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
>> 
> 
> 
> Right.  I thought octals had to start with 0.  I will fix.

Or I though so yesterday when I changed the code.  I believe I have a fix, but I'm going to 
add and execute more lex tests before pushing.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: fix for c99dev string escape char read
  2017-11-23 15:04               ` Matt Wette
@ 2017-11-23 15:14                 ` Jan Nieuwenhuizen
  0 siblings, 0 replies; 13+ messages in thread
From: Jan Nieuwenhuizen @ 2017-11-23 15:14 UTC (permalink / raw)
  To: Matt Wette; +Cc: Guile User Mailing List

Matt Wette writes:

>> Right.  I thought octals had to start with 0.  I will fix.
>
> Or I though so yesterday when I changed the code.  I believe I have a fix, but I'm going to 
> add and execute more lex tests before pushing.

Ah, I now get your reasoning and code there.
Thanks!

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



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2017-11-23 15:14 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-11 17:19 [ANN] nyacc 0.82.2 is released Matt Wette
2017-11-11 18:37 ` [ANN] nyacc 0.82.3 " Matt Wette
2017-11-11 19:53   ` Jan Nieuwenhuizen
2017-11-11 19:59     ` Jan Nieuwenhuizen
2017-11-11 20:00     ` Matt Wette
2017-11-11 22:03   ` [ANN] nyacc 0.82.4 " Matt Wette
2017-11-23  2:11     ` fix for c99dev string escape char read Jan Nieuwenhuizen
2017-11-23  3:28       ` Matt Wette
2017-11-23  5:43         ` Jan Nieuwenhuizen
2017-11-23  7:02           ` Jan Nieuwenhuizen
2017-11-23 14:45             ` Matt Wette
2017-11-23 15:04               ` Matt Wette
2017-11-23 15:14                 ` Jan Nieuwenhuizen

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).