3 ms·
I wrote a C compiler* using flex [1] and bison [2] that generated MIPS code. The biggest downside was the rather complex glue code. At some point ANTLR [3] loo
by optymizer 5y ago
I wrote a C compiler* using flex [1] and bison [2] that generated MIPS code. The biggest downside was the rather complex glue code.
At some point ANTLR [3] looked promising, but these days I'd probably write a lexer and recursive descent parser by hand, then generate LLVM IR [4].
[1] https://github.com/westes/flex https://github.com/westes/flex
[2] https://www.gnu.org/software/bison/ https://www.gnu.org/software/bison/
[3] https://www.antlr.org/ https://www.antlr.org/
[4] https://llvm.org/ https://llvm.org/
* for a subset of the full C89 spec