I wrote a compiler for a general-purpose programming language that creates an optimized tree for parsing its input. This intermediate format is then run through the preprocessor to translate it into the target language for later compilation into its own executable file.
Currently, C ++ is the only target language, but I would like to offer other solutions in case some programs can be useful for compiling with a backend that better supports some constructs in the source language.
Are there any languages that are designed or very well suited for the compiler role?
I know LLVM, and although this is an exciting project in itself, I find it too low-level to directly target. I am looking for generic, medium-high-level languages with high-quality implementations, the syntax of which can be created by the C preprocessor ; this way nothing like Python or Ruby. Lambda support would be nice, but not necessary.
source
share