tranleduy2000 / pascalnide

Pascal Compiler for Android
92 stars 25 forks source link

Support other languages? #17

Open noncom opened 7 years ago

noncom commented 7 years ago

The IDE looks very neat and promising. What do you think about supporting other languages? There are an existing variety of opensource Java interpreters for other languages like Scheme, JavaScript, Lua... what about providing a way to integrate them with the IDE?

Is it possible with other interpreters? I have looked at the source of Pascal NIDE and I see that the IDE itself is seemingly decoupled from the Pascal interpreter. However, I did not get into how much they rely on each other yet.

tranleduy2000 commented 7 years ago

Hello. The IDE separates from the interpreter. It only takes input and receives output. They communicate through the ProgramHandler interface. It provides input data input through the InOutListener interface.

tranleduy2000 commented 7 years ago

About the Pascal interpreter, we will write code in the editor (EditorActivity). Then run the program and receive input and output through AbstractExecActivity. You can also integrate other interpreters like this.

noncom commented 7 years ago

Cool! I am going to try to experiment and integrate some other language (as an experiment). Maybe I will be able to figure out how to do it with the advise that you have provided. However it also feels that some documentation on how to use this mechanism (and how is it recommended to introduce the new interpreter module within the project) would be very good to have, if somebody should try that sort of extension.