开发者

Native Object Oriented Compiler Library

开发者 https://www.devze.com 2023-03-14 12:05 出处:网络
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

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 cod开发者_Python百科e?

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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号