Answer the question
In order to leave comments, you need to log in
How to make a SI compiler in Java?
And so, I need a C to Java compiler. I am writing an Editor of C code for the Android platform. How to make a C compiler?
Answer the question
In order to leave comments, you need to log in
Are you sure? To create a C compiler from scratch, even a very trivial one, even using all sorts of parser generators, is several months of work by a whole team of specialists.
You need to understand assembler, have knowledge of the theory of compilers (there are many books), the theory of languages.
If you just need to tie the compilation to your editor, then, like many other IDEs, you will only need to run a third-party compiler (be it gcc, clang, visual studio, or something else).
They all have a console application that can be passed files as arguments on the command line. You just have to figure out how to run applications in Java.
You don't need to write your compiler in Java.
You can bring a ready-made one with you - at least gcc, at least tcc, at least clang.
https://stackoverflow.com/questions/11852187/how-t...
But if you want to do it yourself from scratch - just like in any other language.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question