Discussion:
[ANN] nyacc 0.81.0 released
Matt Wette
2017-09-02 13:46:02 UTC
Permalink
Nyacc 0.81.0 is released.

This includes the following updates:
1) fix to parsing C comments (nyacc/lex.scm)
2) addition for parsing several GNU C extensions (e.g., asm, statement expressions)
3) fixed bug in cpp.scm where drain-input was used instead of string-get-all
4) in examples/../c99, updates to ffi-helper
5) much hacking on the C99 munging code (c99/util2.scm)
5) numerous other bug fixes

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
http://www.nongnu.org/nyacc/nyacc-ug.html

For support see:
https://savannah.nongnu.org/support/?group=nyacc
Matt Wette
2017-09-10 18:17:12 UTC
Permalink
Nyacc 0.82.0 has been released
1) In the distribution, you will see example .ffi files in examples/ffi/.
https://github.com/TaylanUB/scheme-bytestructures
3) ffi/cairo.ffi is converted to ffi/cairo.scm by the command
$ guild compile-ffi ffi/cairo.ffi
4) It works on my mac. I don't know what else: the code needs to have access
to files in odd places (e.g., lib/gcc/..../include
5) If you do `make install', and have bytestructures in the SITE_SCM_DIR, then
$ make install-ffi-help
...
+++ warning: the FFI Helper is experimental
ffi-help: can't do varargs (yet)
wrote `/var/tmp/zz/scm/ffi/sqlite3.scm'
wrote `/var/tmp/zz/go/ffi/sqlite3.go'
+++ warning: the FFI Helper is experimental
ffi-help: can't do varargs (yet)
wrote `/var/tmp/zz/scm/ffi/libgit2.scm'
wrote `/var/tmp/zz/go/ffi/libgit2.go'
+++ warning: the FFI Helper is experimental
ffi-help: can't do varargs (yet)
ffi-help: no FFI float-type for "long double"
wrote `/var/tmp/zz/scm/ffi/glib.scm'
wrote `/var/tmp/zz/go/ffi/glib.go'
Some additional notes:
6) compile-ffi and compile may take significant time. I have seen compile-ffi take time on
include files that have a large number of re-includes. Nyacc does not try to skip re-reading
include files (like gcc does). And compile takes a long time because the .scm files can be
huge. On my machine, ffi/gio.scm turns out to be about 24 K lines and the gio.go file is 8 MB.
7) In examples I show that passing strings to function is done via (foo (string->pointer "abc")).
Using string->pointer is not required: unwrap~pointer will now deal with this.
8) the FFI Helper files .scm files are distributed in SCM_DIR -- not under nyacc/ :
+ scripts/compile-ffi.scm is the compiler driver invoked by `guild'
+ system/ffi-help-rt.scm is the FFI Helper runtime (macros for defining types, etc)
+ ffi/ is the conventional place to host .ffi files, so ffi/glib.scm is code for (ffi glib)
9) I will need to look into how to add some needed types in guile FFI: intptr_t, long long, long
double.

Matt
Matt Wette
2017-09-16 16:53:17 UTC
Permalink
Nyacc 0.82.1 has been released.

This is a fix to 0.82.0, which has issues with running the FFI helper.
I can now run the cairo ffi helper demo on Centos. To run the ffi helper
cairo demo, check the file HACKING in the distribution.

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
http://www.nongnu.org/nyacc/nyacc-ug.html

For support see:
https://savannah.nongnu.org/support/?group=nyacc
Jan Nieuwenhuizen
2017-11-11 14:27:15 UTC
Permalink
Matt Wette writes:

Hey Matt,
Post by Matt Wette
Nyacc 0.82.1 has been released.
Congrats!

It's been a while but in 0.82.0 I found a regression of a bug that you
fixed earlier, I think in 0.80.4

https://lists.gnu.org/archive/html/guile-user/2017-06/msg00003.html

I've attached the problematic file again. It's also still present in 0.82.1

$ 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.82.1"
scheme@(guile-user)> (use-modules (nyacc lang c99 parser))
scheme@(guile-user)> (with-input-from-file "def-bwl.c" parse-c99)
(unknown):1: parse failed at state 89, on input "DEF_BWL"
(unknown):1: C99 parse error
$2 = #f

Greetings,
janneke
Matt Wette
2017-11-11 15:22:15 UTC
Permalink
Post by Jan Nieuwenhuizen
Hey Matt,
Post by Matt Wette
Nyacc 0.82.1 has been released.
Congrats!
It's been a while but in 0.82.0 I found a regression of a bug that you
fixed earlier, I think in 0.80.4
https://lists.gnu.org/archive/html/guile-user/2017-06/msg00003.html
I've attached the problematic file again. It's also still present in 0.82.1
$ 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.
$1 = "0.82.1"
(unknown):1: parse failed at state 89, on input "DEF_BWL"
(unknown):1: C99 parse error
$2 = #f
Ugh. I thought I had that one. I will take a look

PASS: nyacc/c99-01, CPP: #, ##, __VA_ARGS__

Loading...