Dear Kevan,
you wrote:
Thank you for your explanation, which I enjoyed very much.
You are welcome. :-)
My guess is that this data structure is an abstract syntax tree.
Correct.
If so, will you provide documentation on the AST format as part of Step 1, or will the Pascal code itself provide the documentation,
The latter. For example, the representation of an array type in memory might look as follows.
Type PArrayType = ^TArrayType; TArrayType = object (TComposedType) IndexType, ElementType: PType; LowerIndex, UpperIndex: POrdinalValue end;
or will you use some standard format? Is the existing TREENODE output in GCC's AST format?
The AST is not written to disk, but handed over from the frontend to the backend, which then produces assembler output (in the GCC case).
Until we have a back-end, I suppose the front-end must be compiled with the existing GPC binary. Is that right? But the back-end could also be written in Pascal and compiled the same way.
Correct.
To be precise, the frontend and the backend are not two programs, but two parts of the same program.
When you get the chance, please be more specific about your cost estimate for the front-end in Pascal. If it's $20k, we need forty people donating $500 or ten people donating $2k.
As I wrote today at 15:24:47, the estimate is "several 10000 EUR".
I'm looking at roughly 40 hours to re-write my code for FPC. So a donation of $500 to your cause would be money well spent. A donation of $2000 I would have to think about more carefully.
I understand.
What about the back end? Please estimate how long it would take you to make a C++ back end. I could write a back-end for LLVM IR, I suppose, but I'm not in a position to estimate how many hours it will take me.
Indeed, such numbers are hard to estimate.
Right now, I am looking for sponsors, on this list and elsewhere. If it turns out that "several 10000 EUR" is out of range anyway, then the project is dead. In that case, we are all better off to save our time and money for porting our code to another compiler before the GCC 3.x backend dies, taking the existing GPC with it.
OTOH if enough individuals are willing to invest $500 (Thanks again for your offer!) and enough companies are willing to invest larger amounts, it makes sense to work out more concrete numbers which tell us how far we can get.
Peter