Click to See Complete Forum and Search --> : Sample code for a simple C compiler


PeterP_Swe
12-11-2003, 10:16 AM
Hello,

I'm new to writing compilers etc, and I'm looking for a simple implementation for a minimal C compiler. Preferably as a couple of .y and .l files for flex/bison.

Anyone seen anything like this on the web? I've tried googling for it but couldn't come up with anything...

Cheers,
Peter

dchidelf
12-11-2003, 06:33 PM
This is a bit usefull as far as a BNF grammar for ansi C

http://www.lysator.liu.se/c/ANSI-C-grammar-y.html

PeterP_Swe
12-12-2003, 06:17 AM
Thank you,

This was exactly what I was looking for!

Cheers,
Peter