Hi,
I am working on a COBOL compiler. My plan is to integrate into the GCC back end. I am looking at how to do this. Currently I have about 19,000 lines of code, which is the preprocessor plus the cobol nucleus grammar parser (cobol is a big language), at timjosling.homepage.com.
Currently I have the book 'Using and Porting GCC', plus a sample integration of a toy language, as well as the fortran and pascal implementations. Which I am poring through at the moment.
Given that you guys have already done this, I was wondering if there is anyone there who may be able/willing to answer some questions for me if I get roadblocked? I am not asking to be spoon fed, but sometimes someone just knows the answer to a question that may take ages to work out by yourself.
Any suggestions about starting points, documentation, who to speak to, pros and cons of using the gcc back end are more than welcome.
Tim Josling
Hi, Tim Josling,
you wrote:
I am working on a COBOL compiler. My plan is to integrate into the GCC back end.
That makes GNU COBOL. Be most welcome. :)
I am looking at how to do this. Currently I have about 19,000 lines of code, which is the preprocessor plus the cobol nucleus grammar parser (cobol is a big language), at timjosling.homepage.com.
Currently I have the book 'Using and Porting GCC', plus a sample integration of a toy language, as well as the fortran and pascal implementations. Which I am poring through at the moment.
Given that you guys have already done this, I was wondering if there is anyone there who may be able/willing to answer some questions for me if I get roadblocked? I am not asking to be spoon fed, but sometimes someone just knows the answer to a question that may take ages to work out by yourself.
Be welcome to ask on this list. Also the GCC list gcc@gcc.gnu.org is a good place to ask for help.
Any suggestions about starting points, documentation,
info -f gpc -n "GPC source"
who to speak to,
(See above.)
pros and cons of using the gcc back end are more than welcome.
Pros: You profit from all the development that has already been done for the GCC back end and will be done in the future. Furthermore, the interface to the GCC back end offers some more possibilities than an intermediate language (such as producing C code).
Cons: The interface to the GCC back end ("Tree nodes") is not documentated very well, so it is a hard job to find people who can work with you. You have to obey some GCC-specific programming conventions that tie your language somewhat towards the C language.
Hope this helps,
Peter