+ 1

Coding A Compiler

Well this is weird but let's Think how Solo learn Works. Is it actually possible to code a Compiler for Java and C++ and Other Languages in a code of a Specific Language. I want to work on one. I have seen some codes compiling HTML codes which was fascinating BUT please tell me how to go about it for JAVA or Python or C++ compiling codes.

20th Feb 2020, 4:42 AM
Saptarshi Halder
Saptarshi Halder - avatar
6 Antworten
+ 3
This video might help you to understand how exactly a compiler works👇 https://youtu.be/QXjU9qTsYCc
20th Feb 2020, 4:46 AM
Arsenic
Arsenic - avatar
+ 2
I mean what is the way to start Coding a Compiler like SOLOLEARN
20th Feb 2020, 9:40 PM
Saptarshi Halder
Saptarshi Halder - avatar
+ 1
java is typically compiled to java bytecode for java virtual machine python is not compiled just interpreted commands and does some actions, but we can think about compiler for native machine language too. Then you need parse program text to tokens understand relations and get machine codes for primitive actions as output, and link others sources to compact expected executive format.
20th Feb 2020, 8:09 AM
zemiak
+ 1
Sololearn (playground) is not compiler it is IDE. The client takes source code file and sends it to the server, server call locally instaled command-line compiler for specific language with options and source code file as parameter modifies it with simulate user input. But the different solution is for web languages html,css,js, because they can run on client-side.
21st Feb 2020, 6:49 AM
zemiak
+ 1
As others said earlier, sololearn uses it's installed tools (languages) to show us the output. But if you want to create a one like that, there are.many options available from the Internet. Take a look at this one for example: https://developer.sphere-engine.com/api/compilers Writing your own compiler to make an IDE like playground is not recommended, as it's a huge waste of time. But if you want to know how compilers work or how to create them, then also look at this: https://softwareengineering.stackexchange.com/questions/118586/how-does-a-compiler-work (links are copied from the best results appeared. But you can search more if you like to learn deeper)
21st Feb 2020, 9:57 AM
Seniru
Seniru - avatar
- 1
What a stupid idea. Good question, stupid idea
21st Feb 2020, 5:24 PM
Salim Largo
Salim Largo - avatar