On Sun, 22 Apr 2018 16:11:08 +0100, Ahem A Rivet's Shot wrote:
> Another common approach with BASIC was semi-compiled where
> statements would be compiled on the fly as they were encountered and a
> cache kept of compiled statements - the first target when memory runs
> short of course. The earliest of these caused some consternation as they
> performed unreasonably well on benchmarks which were mostly short loops
> and were thus fully compiled after the first iteration.
>
The only place where I know that approach is used currently is the JIT
optimising compiler in depths of the Java JVM.
The closest I've got to doing anything like the OP wants to do has
involved using lex + yacc or (better) Coco/R to define a special purpose
language that was implemented by generating C or Java and compiling that.
I think the weirdest special purpose language I've used has been NCC
Filetab. It did the sort of job we'd now do with awk, Perl or even RPG,
but it used one or more linked decision tables to describe what needed to
be done with a file's contents plus an almost pictorial printed output
definition. I remember it ran surprisingly fast as well as being fairly
quick and easy to write.
--
Martin | martin at
Gregorie | gregorie dot org
--- SoupGate-Win32 v1.05
* Origin: Agency HUB, Dunedin - New Zealand | FidoUsenet Gateway (3:770/3)
|