Ken Wayne VanderLinde
Ken Wayne VanderLinde

Reputation: 19349

Native Object Oriented Compiler Library

Lately I've been thinking about writing my own language - something I've wanted to do for some time. I have had some guided experience in writing parsers/compilers for simple languages by using the .Net System.Reflection.Emit library. I really liked using that library, especially because of its focus on object-oriented language design.

The problem is that I would rather it be a native language. So I was wondering: are there any good / simple to use libraries which focus on emitting code for object oriented languages (like System.Reflection.Emit), but would actually emit native code rather than managed code?

Note: I am focused on the actual native code generation, not on parsing. Also, it would be preferable if the library was easily accessible from C++, but any language would work.

Upvotes: 0

Views: 194

Answers (1)

bdonlan
bdonlan

Reputation: 231133

You may be interested in LLVM, an open-source C++ library specifically designed for acting as the code-generation backend for portable compilers. It's already in use for the clang C/C++/ObjC compiler, among other things.

Upvotes: 3

Related Questions