ive started https://github.com/sph-mn/sph-sc and have been using it a
lot over the years and worked through several c edge cases. i enjoy
using it, more and more even. the git repository page contains several
hints and ideas on the general topic. i you have any questions, i'd be
happy to answer
> I have implemented a GNU Guile extension which compiles array operations to
> machine code using LLVM: http://wedesoft.github.io/aiscm/
> I thought you might be interested since your example is an array operation.
>
> Regards
> Jan
>
> Am 29. Mai 2020 04:23:46 GMT+01:00 schrieb Keith Wright k
I have implemented a GNU Guile extension which compiles array operations to
machine code using LLVM: http://wedesoft.github.io/aiscm/
I thought you might be interested since your example is an array operation.
Regards
Jan
Am 29. Mai 2020 04:23:46 GMT+01:00 schrieb Keith Wright :
>I am thinkging
One might also take a look at PreScheme:
https://en.wikipedia.org/wiki/Scheme_48 which is a lowlevel Sexp based system
that can generate C or Bytecode.
There’s also BitC, which was/is a sexp based lowlevel language. I cannot recall
if it compiled directly to C, or was itself a compiler to mach
Hi,
There is also Schemetran: https://gitlab.com/codetk/schemetran Perhaps
that was it?
Regards,
Zelphir
On 29.05.20 05:23, Keith Wright wrote:
> I am thinkging about a project that uses Scheme macros
> to generate C code. To this end I want to encode C
> programs as S-expressions. For examp
The other solutions look closer to what you want but
https://savannah.nongnu.org/projects/nyacc
has a C parser written in Guile which outputs SXML
and a pretty-printer which converts the SXML to C code.
On 5/28/20 8:23 PM, Keith Wright wrote:
I am thinkging about a project that uses Scheme
Also have a look at https://github.com/sph-mn/sph-sc
Examples:
;; declaration
(declare
a uint32_t
b (array uint8_t 3)
c (struct (id int) (name char*))
d (enum (x y z))
e (type uint16_t)
f (type (struct (id int) (name char*
;; define with value
(define a uint32_t 1)
;; macros
(pr
Check out the Chibi library (chibi show c). in the Chibi repo at
lib/chibi/show/c.scm and .sld. It provides combinators that create a C
equivalent of the sexp; there is both a macro-based compiler and an
interpreter, IIRC. Unfortunately there is no real documentation. There's
some cleverness in
I am thinkging about a project that uses Scheme macros
to generate C code. To this end I want to encode C
programs as S-expressions. For example, the C program
that is encoded in Ascii as
for (j=0;j<12;++j) a[j] = j*pi/6;
might be encoded as an S-expression as
(for ((= j 0)(< j 12) (++ j)) (=