Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there C to Forth compiler or research? #76

Open
zhoupeng opened this issue Oct 28, 2018 · 9 comments
Open

Is there C to Forth compiler or research? #76

zhoupeng opened this issue Oct 28, 2018 · 9 comments

Comments

@zhoupeng
Copy link

zhoupeng commented Oct 28, 2018

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

@pebhidecs
Copy link

pebhidecs commented Oct 28, 2018 via email

@zhoupeng
Copy link
Author

zhoupeng commented Oct 29, 2018

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
Copy link

pebhidecs commented Oct 29, 2018 via email

@zhoupeng
Copy link
Author

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
Copy link

TG9541 commented Oct 29, 2018

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
Copy link
Author

zhoupeng commented Oct 30, 2018 via email

@spelc
Copy link

spelc commented Jun 27, 2019

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

@cwpjr
Copy link
Member

cwpjr commented Jul 5, 2019 via email

@spelc
Copy link

spelc commented Apr 23, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants