This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
arc2c /
| name | age | message | |
|---|---|---|---|
| |
LICENSE | ||
| |
NOTES | ||
| |
README | ||
| |
a2c.c | ||
| |
a2c.h | Thu Jul 31 04:20:55 -0700 2008 | |
| |
arc2c-tests/ | ||
| |
arc2c.arc | Wed Apr 09 07:57:10 -0700 2008 | |
| |
closures.arc | ||
| |
codegen.arc | Thu Jul 31 08:19:41 -0700 2008 | |
| |
cps.arc | Wed Jul 23 04:31:35 -0700 2008 | |
| |
in-global.arc | ||
| |
lib-ac.scm.arc | Sat Jun 07 20:29:09 -0700 2008 | |
| |
make-eval.arc | ||
| |
rm-global.arc | ||
| |
sharedvars.arc | ||
| |
structs.arc | ||
| |
utils.arc | Mon Apr 07 07:14:47 -0700 2008 | |
| |
xe.arc | Thu Jul 31 08:19:41 -0700 2008 |
_
.-. --\ / arc2c
/ \ --/ \_
This is the Arc to C compiler.
Arc is the new Lisp from Paul Graham (http://arclanguage.org). It's official release is currently implemented as an
interpreter above mzscheme.
Here, we are trying to make a compiler translating Arc code to C code, written in Arc. The goal is to see if (and how) a
dynamically typed language conceived for exploratory programing and protoyping can be compiled efficiently. The current
implementation is based on a tutorial proposed by Marc Feeley : The 90 Minute Scheme to C compiler
(http://www.iro.umontreal.ca/~boucherd/mslug/meetings/20041020/minutes-en.html).
Currently, the compiler implements numerical operations on fixnums (+, -, *, <, >, <=, >=, is, isnt), comparison on
symbols (is, isnt), comparison on characters (is, isnt), comparison and modification on strings (is, isnt, sref),
annotations (type, rep, annotate) and cons cells construction, deconstruction and comparison (cons, car, cdr, is, isnt).
All values can be printed with pr or prn. Unicode is supposed to be fully supported. The language supports first class
continuations (with ccc) and is tail-recursive/tail-call-optimizing. Memory is managed via a home-made GC.
The let, set, sref, and fn syntaxes are partially implemented. quote and if syntax are fully implemented. Symbols,
numbers, and cons cells of symbols, numbers and cons cells can be quoted. Primitive operations cannot be overriden. If
you call an undefined global function, the compiled program will silently crash (many but NOT all such errors are caught
by the compiler). Some primitive operations expect certain type guarantees and do not check for correct types. There are
probably bugs in every part of the program...
Use freely, at your own risk. If you want to improve the tool with us, send mail to sacado.sacado@gmail.com.
To use the compiler, in arc :
(load "arc2c.arc")
(compile-file "foo.arc")
Notes about the compiler's output code is available in the NOTES file.












