unofficial mirror of guile-user@gnu.org 
 help / color / mirror / Atom feed
From: Matt Wette <matt.wette@gmail.com>
To: Guile User <guile-user@gnu.org>
Subject: [ANN] nyacc 1.05.0 released
Date: Sun, 5 Sep 2021 10:11:42 -0700	[thread overview]
Message-ID: <63c5dd05-b882-c351-49ed-2b78b20d7245@gmail.com> (raw)

  
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.

It provides a decent C parser and a `FFI Helper' tool to help create
Guile Scheme bindings for C-based libraries.

It provides (partially implemented) compilers based on above mentioned
parsers to allow execution with Guile as extension languages.

NEWS for V1.05.0

         * remove dependence on srfi-43, vector operations; this was
           causing issues with some Guile versions 2.0.X
         * cleaned up c99-error exception messages in compile-ffi
         * examples/ffi/termios.ffi: added def-keepers
         * in following, $ENL = examples/nyacc/lang
         * removed $ENL/ecmascript
         * $ENL/javascript: merged body.scm into parser.scm
         * install/uninstall read-line-code now returns #<unspecified>
         * $ENL/tcl/parser.scm: fixed reading array index as number;
           (1,2,3) was read as number, now as string
         * scripts/compile-ffi: add option -s to show includes being read
         * c99 parser def-help now adds apple dependencies
         * worked on ffi-helper per-decl usage (i.e. C-decl syntax)
	* updated "make check" to provide overall sucess/fail message

Example using FFI helper w/o define-ffi-module:

mwette$ guile
...
scheme@(guile-user)> ,use (nyacc lang c99 ffi-help)
scheme@(guile-user)> ,pp (C-decl->scm "struct foo { int x; double y; };")
$1 = (bs:struct (list `(x ,int) `(y ,double)))
scheme@(guile-user)>
scheme@(guile-user)> ,use (bytestructures guile)
scheme@(guile-user)> ,use (system ffi-help-rt)
scheme@(guile-user)> (use-modules ((system foreign) #:prefix ffi:))
scheme@(guile-user)>
scheme@(guile-user)> (define struct-foo-desc
                          (C-decl "struct foo { int x; double y; };"))
scheme@(guile-user)> (define-fh-compound-type struct-foo
                          struct-foo-desc struct-foo? make-struct-foo)
scheme@(guile-user)> (make-struct-foo)
$2 = #<struct-foo 0x7f61394d7d40>
scheme@(guile-user)>
scheme@(guile-user)> (define my-sqrt (C-decl "double sqrt(double);"))
scheme@(guile-user)> (my-sqrt 4.0)
$3 = 2.0
scheme@(guile-user)>


mwette$ guile
...
scheme@(guile-user)> ,use (nyacc lang c99 ffi-help)
scheme@(guile-user)> ,d load-include-file
- Procedure: load-include-file filename [#:pkg-config pkg]
      This is the functionality that Ludo was asking for: to be at guile
      prompt and be able to issue
           (use-modules (nyacc lang c99 ffi-help))
           (load-include-file "cairo.h" #:pkg-config "cairo")

scheme@(guile-user)> (load-include-file "cairo.h" #:pkg-config "cairo")
...


NYACC maturity is production/stable 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 guides:
* https://www.nongnu.org/nyacc
* https://savannah.nongnu.org/projects/nyacc
* https://www.nongnu.org/nyacc/nyacc-ug.html
* https://www.nongnu.org/nyacc/ffi-help.html

Report bugs:
* https://savannah.nongnu.org/bugs/?group=nyacc

Get support:
* https://savannah.nongnu.org/support/?group=nyacc




                 reply	other threads:[~2021-09-05 17:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=63c5dd05-b882-c351-49ed-2b78b20d7245@gmail.com \
    --to=matt.wette@gmail.com \
    --cc=guile-user@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).