[Oopic-compiler-devel] C Compiler
Status: Planning
Brought to you by:
ndurant
From: Neil D. <nd...@us...> - 2004-05-20 11:25:54
|
I've been looking to see if there are any simple open source C compilers out there that we could use as a starting point for our OOPIC compiler, or at least use it for ideas etc. Anyway, I've found one, which compiles to assembler for a stack-based virtual machine: <http://fabrice.bellard.free.fr/fbcc.html> It uses Flex/Bison for parsing, and implements ANSI C. It's released under the GPL licence so there's no reason why we can use any or as much or the source code as we need. As it compiles to assembler for a stack-based VM, I thought it may be pretty close to what we need - we may just have to re-write the code generation stuff to get it to generate OOPIC "assembler". I thought I'd post this so we can all have a look at it. We should only use something like this if we fully understand how it works, and if it does actually work! The code looks fairly clean and well-written (from a quick browse around the source files), so it all looks promising. At the very least we can use their Flex/Bison grammar files for parsing ANSI C and creating the internal representation of the code. Thoughts? Neil -- Neil Durant <nd...@us...> |