Dear Peter,
But anyway, the backend is step 2.
I see. Let me make sure I understand the backend/frontend parts.
You propose a GPC "frontend" written in Pascal. Given a Pascal program as input, this frontend will produce a "Pascal data structure in memory" (I'm quoting you there, but I'm pretty sure I know what you mean).
The existing GPC frontend is written in C. Given a Pascal program as input, this existing frontend produces... what? I thought it was GCC IR code. But now it looks like the existing frontend produces a Pascal data structure in memory.
I'm assuming that Step 1 produces something that works before we complete Step 2, which means the existing backend must be working with the same Pascal data structure in memory that the new Pascal GPC will produce.
Am I on the right track?
Yours, Kevan