|Re: PL/MIX firstname.lastname@example.org (Roberto Waltman) (2007-02-07)|
|Re: PL/MIX email@example.com (Max Hailperin) (2007-02-08)|
|Re: PL/MIX firstname.lastname@example.org (Allan Adler) (2007-02-08)|
|Re: PL/MIX email@example.com (Roberto Waltman) (2007-02-08)|
|Re: PL/MIX firstname.lastname@example.org (glen herrmannsfeldt) (2007-02-08)|
|Re: PL/MIX email@example.com (Steven Nichols) (2007-02-09)|
|Re: PL/MIX firstname.lastname@example.org (Allan Adler) (2007-02-09)|
|Re: PL/MIX email@example.com (Allan Adler) (2007-02-11)|
|Re: PL/MIX ArarghMail702@Arargh.com (2007-02-12)|
|Re: PL/MIX Peter_Flass@Yahoo.com (Peter Flass) (2007-02-12)|
|[3 later articles]|
|From:||Roberto Waltman <firstname.lastname@example.org>|
|Date:||8 Feb 2007 16:56:56 -0500|
|References:||<email@example.com> 07-02-018 07-02-025|
|Posted-Date:||08 Feb 2007 16:56:56 EST|
Allan Adler wrote:
>Roberto Waltman <firstname.lastname@example.org> writes:
>> Indeed. Adding "structured programming" control structures to a
>> language is a simple exercise that has been repeated many times, using
>> macros, (for assemblers with adequate macro facilities,) or with
>> simple preprocessors for either assembly or higher level languages.
>Since it is an exercise, is there perhaps a concise statement of that
>exercise as an explicit exercise in some programming text? Preferably
>something like, "Take the fake assembly language we defined in section
>2 and enhance it with 'structured programming' control structures. For
>example, add the following constructions and capabilities: ... "?
I personally did it three or four times for assemblers (PDP MACRO-11,
Z80, IAR 68HC11) and once for BASIC. (MicroBee Basic) Don't have the
sources any more, and the idiosyncrasies of the macro languages may
make them difficult to understand. (The IAR version in particular.)
Ratfor (Rational Fortran) is probably a better starting point,
specially the Ratfor in Ratfor version. (Even if you are not familiar
with Fortran.) A quick search for the basic methodology in Ratfor
* Ratfor: A preprocessor for rational Fortran
Not Ratfor, but same ideas:
* An Algorithm for Structuring Programs:
For Ratfor (Rational FORTRAN) in Ratfor:
(Avoid the PASCAL version of the book)
(Or download the Ratfor sources from any Linux/FreeBSD etc.
There were other similar projects aiming to Algolize FORTRAN.
There was a FLEX preprocessor, (no relation to the flex lexical
analyzer,) and I saw a thesis from a student at a Mexican university
that basically duplicated Ratfor.
A well known Pascal book on data structures also had an section on
extending Pascal. (May have been Horowitz and Sahni?. I don't have it
Another option is books describing "toy" compilers:
* "Brinch Hansen on Pascal Compilers",
* Pyster's "Compiler Design and Construction" (Rascal),
* Wirth's "Compiler Construction"
(Available on-line: http://www.oberon.ethz.ch/WirthPubl/CBEAll.pdf )
* Wirth again, the Pascal subset compiler described in "Algorithms +
Data Structures = Programs"
(Avoid the Small-C family, because of its had-hoc approach with no
String oriented languages such as awk and perl would be good
implementation languages for this type of project, regardless of what
the target is.
Hope this helps,
Return to the
Search the comp.compilers archives again.