I am working on a project where I have to define a new processor hardware architecture. I need a compiler to generate assembly code for this target (it has its own instruction set).
Programs for this processor will be written in C.
My idea to do this is to parse the C code and generate an Abstract Syntax Tree (AST), then from the AST generate the assembly.
Certainly I'd like to reuse existing components (no need to rewrite a C parser I hope), but what tools or frameworks may I use to accomplish this task?
Thanks.