Other Software Tools


Contents


Embedded-C: A source-code filter for embedding C expressions

Embedded-C is a small Perl-written tool which embeds the result of arbitrary C expressions/statements into a source code, using a syntax similar to EPerl, ERB, or ASP.

For a simple example, an input

<%#shared
#include <errno.h>
#%>
<%#libs -lm #%>
<%#cflags -Wall #%>
#define EINVAL <%=d EINVAL %>
#define EFAULT <%=d EFAULT %>
produces result
#define EINVAL 22
#define EFAULT 14
in single command invocation like "ec source.ec". The script is language-independent: it can be used to generate C sources, Caml sources, [insert your favorite language name here] sources, or even text files. It also has support for nested embedding with error recovery. See the file SYNTAX and README contained in the distribution.

The Embedded-C translator is a part of Fail-Safe C compiler (under development). It is distributed under modified QPL. See the file LICENSE for details.

Files


Other Software

Caml-related software (i.e. Regexp/OCaml) is distributed in a separate page. My old "written-as-hobby" software is also distributed in another page.