I
I
ivan gi2015-10-28 15:00:36
Programming
ivan gi, 2015-10-28 15:00:36

How to start implementing a language translator?

How to start implementing a language translator? That is, for example, a language with its own syntax is a translated ready-made language. Like coffeescript in JS. Where to begin? where to read about it? Thanks in advance!

Answer the question

In order to leave comments, you need to log in

5 answer(s)
N
nirvimel, 2015-10-28
@nirvimel

300px-CompilersBook2ed.png

K
Konstantin Nagibovich, 2015-10-28
@nki

I would start with the question - "why is it needed?".

O
OnYourLips, 2015-10-28
@OnYourLips

From theory. Nothing can be done in this area without theory.
The book was recommended above.

O
Oleg Tsilyurik, 2015-10-28
@Olej

How to start implementing a language translator?

Today, this is such a well-developed theory (compilations) that for new languages, the difficulty is precisely the successful formalization of syntax and semantics, and the subsequent implementation is already a trifling matter (the book was shown to you).
But! Of the many dozens of modern languages , only 3, 4 or 5 (this is how you count) remain compiling to machine code, and a few more compiling to intermediate bytecode.
So for most languages, you still need to implement ... an interpreter, a virtual machine, an execution system, a runtime environment (these are all different names for the same thing). And this part is much more complicated than compilation, and here the book shown above is not an assistant for you.

H
hostwell, 2015-10-28
@hostwell

And why do you need it?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question