|From:||Kaz Kylheku <email@example.com>|
|Date:||Wed, 22 Jun 2022 01:31:41 -0000 (UTC)|
|Organization:||A noiseless patient Spider|
|Injection-Info:||gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="24906"; mail-complaints-to="firstname.lastname@example.org"|
|Posted-Date:||21 Jun 2022 21:48:57 EDT|
On 2022-06-18, Roger L Costello <email@example.com> wrote:
> Hi Folks,
> I am reading "Software Tools" by Kernighan and Plauger. One of the things that
> I've learned is that Ratfor is a simple abstraction on top of Fortran. For
> example, Ratfor provides a while loop. The while loop can be mechanically
> converted to Fortran if-then and goto statements. Really cool!
> That got me to wondering, "What other programming languages are simply
> abstractions on top of an existing programming language?"
In the Ratfor spirit, in April 2022, I introduced a new one: cppawk.
Using the GNU C preprocessor, with C99 semantics, I managed to build,
for instance, a loop macro that supports multiple clauses that
combine for parallel or nested (cross product) iteration.
Not only are there some userful predefined clauses, but they
Even the Common Lisp LOOP macro deosn't have user-definable clauses.
I made it possible in five #define statements.
There is a "Mock Lisp" data abstraction layer as well: cons cells
are represented and such. Lists can be passed around and mapped
over (if you have GNU Awk, which has indirect functions).
cppawk provides a case statement which "compiles" either to
a GNU Awk switch (nonstandard extension) or else portable
constructs that work in other Awks.
> [The infamous m4 macrogenerator is used to build what are in effect new
> languages like the sendmail configuration and GNU Autoconf. -John]
GNU m4 underlies the Bison implementation: it's what glues together
the parser skeleton templates with the grammar tables and whatnot
to produce the output.
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Return to the
Search the comp.compilers archives again.