Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

First off, I know this is a question asked by MANY other programmers before me.

ID: 654301 • Letter: F

Question

First off, I know this is a question asked by MANY other programmers before me. But I couldn't find any useable resource that could help me.

Well, I'm creating an programming language called "Light" the syntax is comparable to python but it has an strict object-orientated concept.

I have made an interpreter ( in C++ ) for this language yet, my problem is how to turn this into an executeable. ( Or simply: how do I make an compiler ? )

Thanks for your attention

P.S.: I've found some links to a very old tutorial but it is in Pascal...

EDIT: Well, well. Now I have found a suitable tutorial for C++. About the project: There have been some changes. Now the language is called "Q." ( kju Dot ).

Explanation / Answer

The first couple of steps lexing/parsing (and analysis, depending on how that's structured) can be the same. But you will need to convert your representation to a code-generating representation. Typically LLVM is used for hobbyists as it is pretty much the only remotely decent free code-generating library around.