??? 11/12/11 07:04 Read: times |
#184661 - Sometimes it's hidden Responding to: ???'s previous message |
One of a number of BASIC interpreters with which I once had contact did the "build" operation during the first run, then saved the tokenized BASIC rather than the plain-text that had been entered.
A 'C' interpreter for the PC that I encountered in the early '80's worked similarly. I'm not certain about "turbo-Prolog" but it may have operated in that way as well. There were several fully interpreted Prolog packages as well, but I believe the interface to 'C' was less than ideal. Interpreters seem to be big, slow, and cumbersome. One fellow I knew years ago, may he rest in peace, wrote a rather interesting interpreter for the 6502, loosely based on Algol65, which used an iterpreted intermediate language, effectively a simulated virtual machine, and while the source language was compiled, the run was done on that intermediate interpreted language, tokenized, of course, and worked VERY well. The language was complete enough that it could be compiled in itself, and would produce a new, runnable compiler. If a new CPU was to be used, all one was required to do was to create a suitable intermediate interpreter for that MCU, as the code produced by the compiler would run on that as well as on the other CPU. I thought it was a pretty good approach to producing a better-than-average tool in short order. If you don't insist on full ANSI-compliance, there are numerous "free" C-compilers available that might work as well. I know of at least one "free" tiny-C package for 805x, and there's even a floating point patch for it. I don't know how "good" that one is, but I do know that several people have used it with considerable success. RE |
Topic | Author | Date |
Interpreted Languages? | 01/01/70 00:00 | |
Sometimes it's hidden | 01/01/70 00:00 | |
p-code | 01/01/70 00:00 | |
P-code and others | 01/01/70 00:00 | |
interpreter/compiler | 01/01/70 00:00 | |
Debatable | 01/01/70 00:00 | |
Not necessarily machine code | 01/01/70 00:00 | |
Definitely debatable | 01/01/70 00:00 | |
Ofcourse not | 01/01/70 00:00 | |
runtime errors | 01/01/70 00:00 | |
You can't | 01/01/70 00:00 | |
You missed the point! | 01/01/70 00:00 | |
Not always worth it with interpreted languaes | 01/01/70 00:00 | |
I like your thinking | 01/01/70 00:00 | |
Many FORTH implementations are interpreted, aren't they? | 01/01/70 00:00 | |
Forth | 01/01/70 00:00 | |
Maybe a comparison? | 01/01/70 00:00 |