[Info-vax] The (now lost) future of Alpha.
Arne Vajhøj
arne at vajhoej.dk
Fri Aug 3 18:23:51 EDT 2018
On 8/3/2018 5:24 AM, invalid wrote:
> On 2018-08-03, invalid <address at is.invalid> wrote:
>> On 2018-08-02, Arne Vajhøj <arne at vajhoej.dk> wrote:
>>> On 8/1/2018 2:10 PM, invalid wrote:
>>>> I agree with this and anyway, Ratfor is not a compiler. It's just a
>>>> preprocessor written for FORTRAN in PASCAL and then I think it got ported to
>>>> C. I think it's in K&R's Software Tools book.
>>>
>>> Pascal????
>>>
>>> Where did you get that idea from?
>>
>> I thought it was in K&R's Software Tools. I don't have the book accessible
>> now so I can't verify.
>>> I looked it up.
>>>
>>> https://docs.lib.purdue.edu/cgi/viewcontent.cgi?article=1171&context=cstech
>>>
>>> clearly states that RATFOR was written in RATFOR.
>>
>> Thanks I will check it. Sorry if what I wrote was incorrect.
>>
>> "Memory is the first thing to go, can't remember what the 2nd is..."
>
> My memory was fine and you guys didn't look far enough.
>
> "History
> Ratfor was designed and implemented by Brian Kernighan at Bell Telephone Laboratories in 1974, and described in Software—Practice & Experience in 1975. It was used in the book "Software Tools" (Kernighan and Plauger, 1976).
>
> In 1977, at Purdue University, an improved version of the ratfor
> preprocessor was written. It was called Mouse4, as it was smaller and faster
> than ratfor. A published document by Dr. Douglas Comer, professor at Purdue,
> concluded "contrary to the evidence exhibited by the designer of Ratfor,
> sequential search is often inadequate for production software. Furthermore,
> in the case of lexical analysis, well-known techniques do seem to offer
> efficiency while retaining the simplicity, ease of coding and modularity of
> ad hoc methods." (CSD-TR236)."
>
> See wikipedia for Ratfor
No.
It is you that did not look far enough.
The above does not say a word about Pascal.
If you actually read my link (from 1977) then you would have
seen:
<quotes>
...
The RATFOR processor, written in RATFOR, is modular, carefully
coded, and portable, but extremely inefficient.
...
A more dramatic improvement in running time was obtained by
rewriting the ad hoc lexical scanner using a standard method
based on finite automata. For a 3000 line source program
the standard RATFOR required 185.470 CPU seconds on a CDC 6500
while the automata based version needed only 12.723
seconds.
...
Additional information about RATFOR is available in the text [2],
which includes most of the source code for RATFOR in the chapter on
preprocessing.
...
[2] Kernighan, B. and Plauger, P., Software Tools, Addison Wesley 1976.
</quotes>
So RATFOR is in Software Tools Kernighan and Plauger 1976.
But both the original and the derivative MOUSE4 are in RATFOR.
And if you lookup the book you find:
https://www.amazon.com/Software-Tools-Brian-W-Kernighan/dp/020103669X/
which says:
<quote>
The programs are presented in a structured language called Ratfor
("Rational Fortran") which can be easily understood by anyone familiar
with Fortran or PL/I, Algol, PASCAL, or similar languages. (Ratfor
translates readily into Fortran or PL/I. One of the tools presented is a
preprocessor to translate Ratfor into Fortran).
</quote>
So RATFOR in RATFOR.
I suspect you are thinking about the later book "Software Tools
in Pascal" from 1981.
https://www.amazon.com/Software-Tools-Pascal-Brian-Kernighan/dp/0201103427
Not sure if it has a RATFOR in Pascal. But even if it has then
it is not the original.
Arne
More information about the Info-vax
mailing list