Re: writing a C compiler in Common Lisp



> Second, it's rather heavy - lots of .el files. I want something
> lighter, like CL-YACC (started looking at it too, looks good so far).

Well, I wrote CL-Yacc exactly for that reason -- I needed to parse C.
I've ripped out the lexer, parser and pretty-printer from my current
development sources and put them on

http://www.pps.jussieu.fr/~jch/software/files/cpc-parser-20050411.tar.gz

You are welcome to use this code in any way you see fit. I would
appreciate it, however, if you could make sure to credit me as the
original author in the documentation of any software that uses these
sources.

And Steven H. is right -- parsing C is a pain.

This is most definitely work in progress; while a variant of this code
has successfully parsed a few thousands lines of C, it is known to be
incomplete and buggy. Of course, I'm interested in any fixes you may
want to send me.

Enjoy,

Juliusz Chroboczek

.