We describe a new free software project, called CGen [name might change], a C
code generator with support for Common Lisp-style macro
expansion. It is based on a new S-Expression based Syntax
for C (and C-like languages) which is transcompiled to C
(or C-like) code. Our code generator supports the simple
and efficient management of variants, ad hoc code
generation to capture reoccurring patterns, composable
abstractions as well as the implementation of embedded
domain specific languages by using the Common Lisp macro
system. We demonstrate the applicability of our approach
by numerous examples from small scale convenience macros
over embedded languages to real-world applications in
high-performance computing.
After successful presentation at ELS in 2014 we decided to
polish our research prototype and make it available as
free software.