+ 1

Translator?

I wonder can we make a programming language translator that translates a programming language to other ones?

15th Jan 2020, 6:20 PM
RinasSam
RinasSam - avatar
4 Answers
+ 2
DishaAhuja I know all that. I've even coded a translator for Pascal to C. It took me under a week and translated 500K lines of code. My team spent a week fixing the issues to have running code 45 days faster than planned.
15th Jan 2020, 10:28 PM
John Wells
John Wells - avatar
+ 1
There are examples of these codes currently available. However, I've never seen a perfect one. Taking a few thousand lines of code and recoding by hand could take days. Running a conversion and fixing the code will take hours. Every line must be checked. Most will be fine, but 10 to 20% will need fixing.
15th Jan 2020, 9:54 PM
John Wells
John Wells - avatar
+ 1
John Wells yes at internet some translator available and buggy too but if for an project creation modules can be designed within limited time, for that information regarding behavior of the host language in which you are coding as well as the destination language Grammar and rules, library functions all definition is required to be present in the code of hot language. Creating this from scratch can even takes years so module division And code individual modules and work on them regularly can make understand the behavior of 2 language easily Have some 🍎 🍎 🍎
15th Jan 2020, 10:00 PM
DishaAhuja
DishaAhuja - avatar
0
RinasSam we can do anything from programming language but the important thing is the roots of any language. To convert the one language program into other language you needs to be know the Grammars, Syntax, Properties, evaluation, supported concepts, Compilers. Once you have enough knowledge of this topics then you can go further in creations of translation of one program to other. You just need to code other language grammar into your host language and then when you input any program that will be converted to other programming language. But to do so you need to have enough root to create your task over that. So first understand one language then with the help of that language create an environment where you can compile other language code then apply that language property into your code and then make it work for simple program to complex program. It's big task do need time and consistency. Have an 🍎 🍎 🍎
15th Jan 2020, 9:49 PM
DishaAhuja
DishaAhuja - avatar