unofficial mirror of 
 help / color / mirror / Atom feed
* [ANN] nyacc 1.05.0 released
@ 2021-09-05 17:11 Matt Wette
  0 siblings, 0 replies; only message in thread
From: Matt Wette @ 2021-09-05 17:11 UTC (permalink / raw)
  To: Guile User

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)> ,use (bytestructures guile)
scheme@(guile-user)> ,use (system ffi-help-rt)
scheme@(guile-user)> (use-modules ((system foreign) #:prefix ffi:))
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)> (define my-sqrt (C-decl "double sqrt(double);"))
scheme@(guile-user)> (my-sqrt 4.0)
$3 = 2.0

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:

* the git repository:

home page, project page and user's guides:

Report bugs:

Get support:

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-09-05 17:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-05 17:11 [ANN] nyacc 1.05.0 released Matt Wette

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