Ask HN: Write a C compiler in Ocaml?

1 points by remyb ↗ HN
I have completed an internship in a research lab in the compilation field, specifically in program analysis for embedded systems and I've always been fascinated by compilers.

After writing a basic C parser in Objective Caml and since I'm fairly comfortable in C and low-level programming, I'm asking : what do you think of writing a C compiler in Ocaml or C, given the main goals : fun, getting experience in compiler writing, and maybe bootstrapping (maybe not directly).

However, I am not crazy enough to believe that I will be able to support the whole language or compile any non-trivial program in a short term, I am talking more about a long term experiment.

Note : It would be based on Lex / Yacc.

2 comments

[ 3.7 ms ] story [ 18.2 ms ] thread