ForthHub / discussion

Discussion repository for Forth enthusiasts.
118 stars 4 forks source link

Is there C to Forth compiler or research? #76

Open zhoupeng opened 5 years ago

zhoupeng commented 5 years ago

Is there compiler, papers or reports about c to forth pls?

pebhidecs commented 5 years ago

On 28/10/2018 at 8:06 AM, "zhoupeng" notifications@github.com wrote:

compiler, papers or report on c to forth?

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/ForthHub/discussion/issues/76

There are such things around. See http://www.mpeforth.com/ for details of their 'Sock-Puppet' which will handle c-code with the ease you can handle Forth words. There might also be some papers in the past EuroForth proceedings http://www.complang.tuwien.ac.at/anton/euroforth/.

Regards

Paul E. Bennett IEng MIET Systems Engineer Lunar Mission One Ambassador --


Paul E. Bennett IEng MIET..... Forth based HIDECS Consultancy............. Mob: +44 (0)7811-639972 Tel: Due to relocation - new number TBA. Please use Mobile. Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..


zhoupeng commented 5 years ago

On 28/10/2018 at 8:06 AM, "zhoupeng" @.***> wrote: compiler, papers or report on c to forth? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: #76 There are such things around. See http://www.mpeforth.com/ for details of their 'Sock-Puppet' which will handle c-code with the ease you can handle Forth words. There might also be some papers in the past EuroForth proceedings http://www.complang.tuwien.ac.at/anton/euroforth/. Regards Paul E. Bennett IEng MIET Systems Engineer Lunar Mission One Ambassador.

Thank you very much, it's helplful. but I think Sock-Puppet give solution on how to call C libary from Forth, rather than compile C source to Forth directly, if my understanding wrong pls correct me.

I find a report https://github.com/daniRiesgo/C-to-Forth-compiler/blob/master/report.pdf, but unfortunately, it is not written in English.

Thanks, Best,

pebhidecs commented 5 years ago

There are such things around. See http://www.mpeforth.com/ for details of their 'Sock-Puppet' which will handle c-code with the ease you can handle Forth words. There might also be some papers in the past EuroForth proceedings http://www.complang.tuwien.ac.at/anton/euroforth/.

Thank you Mr Paul very much, it's helplful. but I think Sock-Puppet give solution on how to call C libary from Forth, rather than compile C source to Forth directly, if my understanding wrong pls correct me.

I find a report https://github.com/daniRiesgo/C-to-Forth- compiler/blob/master/report.pdf, but unfortunately, it is not written in English.

Yes, the C has to be compiled first, then Sock-Puppet acts like the linker for the C routines.

The one you found looks like Spanish. I guess some time with a translator package might yield most of the sense out of it.

Regards

Paul E. Bennett IEng MIET Systems Engineer Lunar Mission One Ambassador --


Paul E. Bennett IEng MIET..... Forth based HIDECS Consultancy............. Mob: +44 (0)7811-639972 Tel: Due to relocation - new number TBA. Please use Mobile. Going Forth Safely ..... EBA. www.electric-boat-association.org.uk..


zhoupeng commented 5 years ago

There are such things around. See http://www.mpeforth.com/ for >details of their 'Sock-Puppet' which will handle c-code with the >ease you can handle Forth words. There might also be some papers >in the past EuroForth proceedings >http://www.complang.tuwien.ac.at/anton/euroforth/. Thank you Mr Paul very much, it's helplful. but I think Sock-Puppet give solution on how to call C libary from Forth, rather than compile C source to Forth directly, if my understanding wrong pls correct me. I find a report https://github.com/daniRiesgo/C-to-Forth- compiler/blob/master/report.pdf, but unfortunately, it is not written in English. Yes, the C has to be compiled first, then Sock-Puppet acts like the linker for the C routines. The one you found looks like Spanish. I guess some time with a translator package might yield most of the sense out of it. Regards Paul E. Bennett IEng MIET Systems Engineer Lunar Mission One Ambassador -- **** Paul E. Bennett IEng MIET..... Forth based HIDECS Consultancy............. Mob: +44 (0)7811-639972 Tel: Due to relocation - new number TBA. Please use Mobile. Going Forth Safely ..... EBA. www.electric-boat-association.org.uk.. ****

It's good, thank you very much.

TG9541 commented 5 years ago

You might want to have a look at the ELVM Compiler Infrastructure, even if it looks more like a proof of concept. The (very simple) Forth backend is here.

zhoupeng commented 5 years ago

Great, thank you very much.

Best,

zhoupeng 

At 2018-10-29 20:18:19, "Thomas" notifications@github.com wrote:

You might want to have a look at the ELVM Compiler Infrastructure, even if it looks more like a proof of concept. The (very simple) Forth backend is here.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

spelc commented 5 years ago

There's a community version from long ago at: https://www.mpeforth.com/resource-links/downloads/ Look for C2Forth.

cwpjr commented 5 years ago

I'm in retirement on ss in America. I still intend to save for your modern product Stephan,

On Thu, Jun 27, 2019 at 5:03 AM spelc notifications@github.com wrote:

There's a community version from long ago at: https://www.mpeforth.com/resource-links/downloads/ Look for C2Forth.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ForthHub/discussion/issues/76?email_source=notifications&email_token=ABILVRKOBAV4RZNSHLRN2M3P4SF7LA5CNFSM4F7XLPRKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYWUALQ#issuecomment-506282030, or mute the thread https://github.com/notifications/unsubscribe-auth/ABILVRMDHWRUKLQUQN5URCDP4SF7LANCNFSM4F7XLPRA .

spelc commented 4 years ago

The code link at https://www.mpeforth.com/resource-links/downloads/ disappeared a while back but has now been restored.