[Top][All Lists]

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

[ANN] Nyacc version 0.83.0 released

From: Matt Wette
Subject: [ANN] Nyacc version 0.83.0 released
Date: Sun, 21 Jan 2018 10:19:11 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

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
                  (list ffi:double ffi:double)
       (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:

* the git repository:

home page, project page and user's guide:

For support see:

reply via email to

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