Matt Wette
2018-01-21 18:19:11 UTC
Nyacc version 0.83.0 has been released. Nyacc is a set of Guile
modules for generating parsers,
parsing C code, and converting C headers to Guile Scheme.
Version 0.83.0 includes the following changes over version 0.82.4:
1) changes to nyacc/lex.scm to read octal constants
2) change in C99 parser to allow lone `;' in structs and unions
3) fixed but in C99 parser which was truncating long CPP defines
4) change in C99 parser to make get-gcc-inc-dirs more accurate
5) updated C99 pretty printer to handle initializer lists
6) many changes to the ffi-helper
Some FFI Helper changes:
1) many code updates, api changes, etc
2) updates to the documentation (see examples/nyacc/lang/c99/ffi-help.texi)
3) added procedure "load-include-file", which is feature Ludo asked for:
guile> (load-include-file "cairo.h" #:pkg-config "cairo")
This will load FFIs for all C declarations in cairo.h into the
current module.
Not flushed out.
4) added procedure "fh-cnvt-cdecl" for playing around with the FH.
guile> (use-modules (nyacc lang c99 ffi-help))
guile> (use-modules (bytestructures guile))
guile> (use-modules (system ffi-help-rt))
guile> (use-modules ((system foreign) #:prefix ffi:))
guile> (define fh-llibs '())
guile> (define fexp (fh-cnvt-cdecl "fmod" "double fmod(double
x,double y);")
guile> ,pp exp
$1 = (begin
(define ~fmod
(delay (fh-link-proc
ffi:double
"fmod"
(list ffi:double ffi:double)
fh-llibs)))
(define (fmod x y)
(let ((~x (unwrap~float x)) (~y (unwrap~float y)))
((force ~fmod) ~x ~y)))
(export fmod))
guile> (eval exp (current-module))
guile> (fmod 2.3 0.5)
$2 = 0.2999999999999998
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
* the tarball repository:
https://download.savannah.gnu.org/releases/nyacc/
* the git repository:
git://git.savannah.nongnu.org/nyacc.git
home page, project page and 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
mwette$
modules for generating parsers,
parsing C code, and converting C headers to Guile Scheme.
Version 0.83.0 includes the following changes over version 0.82.4:
1) changes to nyacc/lex.scm to read octal constants
2) change in C99 parser to allow lone `;' in structs and unions
3) fixed but in C99 parser which was truncating long CPP defines
4) change in C99 parser to make get-gcc-inc-dirs more accurate
5) updated C99 pretty printer to handle initializer lists
6) many changes to the ffi-helper
Some FFI Helper changes:
1) many code updates, api changes, etc
2) updates to the documentation (see examples/nyacc/lang/c99/ffi-help.texi)
3) added procedure "load-include-file", which is feature Ludo asked for:
guile> (load-include-file "cairo.h" #:pkg-config "cairo")
This will load FFIs for all C declarations in cairo.h into the
current module.
Not flushed out.
4) added procedure "fh-cnvt-cdecl" for playing around with the FH.
guile> (use-modules (nyacc lang c99 ffi-help))
guile> (use-modules (bytestructures guile))
guile> (use-modules (system ffi-help-rt))
guile> (use-modules ((system foreign) #:prefix ffi:))
guile> (define fh-llibs '())
guile> (define fexp (fh-cnvt-cdecl "fmod" "double fmod(double
x,double y);")
guile> ,pp exp
$1 = (begin
(define ~fmod
(delay (fh-link-proc
ffi:double
"fmod"
(list ffi:double ffi:double)
fh-llibs)))
(define (fmod x y)
(let ((~x (unwrap~float x)) (~y (unwrap~float y)))
((force ~fmod) ~x ~y)))
(export fmod))
guile> (eval exp (current-module))
guile> (fmod 2.3 0.5)
$2 = 0.2999999999999998
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
* the tarball repository:
https://download.savannah.gnu.org/releases/nyacc/
* the git repository:
git://git.savannah.nongnu.org/nyacc.git
home page, project page and 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
mwette$