I have some thirty-year-old legacy code in what's best described as a legacy dialect of Scheme. The important differences are:
* A different syntax for lists -- a slash can be used to introduce a final sublist of a list. This reduces the piling up of lots of close brackets when a list's last element is a list whose last element is a list whose ... .
* A different syntax for 'let' that is to the regular 'let' as 'if' is to 'cond'. This works well with the slash notation.
* Its own nonhygienic macro processor.
* No first-class continuations, though I wished I had them available thirty years ago.
The existing implementation is bootstrapped from a subset of itself, and involves an interpreter and translators to VAX assembly language.
I'd like to revive the legacy code that's written in that Scheme, and it seems that a good approach would be to it translate to Gambit, and thence to C. Perhaps starting with the bootstrap code and being opportunistic after that.
Any suggestions as to a programmer-time efficient way to use or modify existing tools to accomplish that?
-- hendrik
Afficher les réponses par date
On Sun, Jun 16, 2013 at 11:19:37AM -0400, Hendrik Boom wrote:
I have some thirty-year-old legacy code in what's best described as a legacy dialect of Scheme. The important differences are:
Presumably it's poosible to write my own read routine that parses.
Then perhaps I could write my own let macro to expand my let into whatever works in gambit -- presumably something that uses the standard let macro.
Is there some namespace mechanism that could allow me to distinguish the two let's?
If not, I suppose I could have the variant read routine read every symbol let into LET or lett or something else ugly. But this is ugly and nonmodular, and I'll probably have a few more cases like this; I'd prefer something clean.
And how do line numbers from the original source coded get embedded into the S-expressions so that the interpreter (and, presumably the compiler) can use them when reportin on errors?
-- hendrik