🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.misc
Article #3363

Re: Algol68

#3363
From: Paul Campbell
Date: Sun, 07 Apr 1991 03:48
41 lines
2291 bytes
In article <4217@zaphod.UUCP> bobd@zaphod.UUCP (Bob Dalgleish) writes:
>In article <801@taniwha.UUCP> paul@taniwha.UUCP (Paul Campbell) writes:

>>I always had the idea that what Wirth did was implement all the 'easy'
>>stuff in Pascal.

>How do you mean?

Well he implemented the basic type structures (but not full pointers or
unions), most of the flow control (but only as voids) etc etc

I didn't mean this in a bad way - I think that it was probably a good choice
at the time - and the results are obvious - Pascal caught on because it
is (relatively) easy to implement and a portable compiler is available ...

>Hank Boehm at the University of Alberta in Edmonton put together a neat
>method of recognition.  He constructed two slr(0) grammars, one to be
>applied left to right, and the other to be applied by reading the source
>backwards.  When the I/O system was added afterwards, his parser failed.
>I also saw some work on attribute grammars, which were well over my
>head.

I did something similar except I did two passes, the first parsed the 
parenthesis (control flow and mode/operator/prio decs)  using recursive
descent - the result was a tree annotated with the unparsed expressions
in it. The second pass traversed the treee and used a lr0 parser that
was recursively run on the unparsed nodes - the result being a treee that was
walked to generate code.

	Paul Campbell

PS: for those who don't know even the revised report contains ambiguity,
the most common example is:

	union([]int , struct (int a, b, c)) fred = (1,2,3);

-- 
Paul Campbell    UUCP: ..!mtxinu!taniwha!paul     AppleLink: CAMPBELL.P

"But don't we all deserve.
 More than a kinder and gentler fuck" - Two Nice Girls, "For the Inauguration"
Technical Details
Message-ID: <809@taniwha.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!think.com!ames!lll-winken!iggy.GW.Vitalink.COM!pacbell.com!pacbell!rtech!mtxinu!taniwha!paul
References: <9168@castle.ed.ac.uk> <4202@zaphod.UUCP> <801@taniwha.UUCP> <4217@zaphod.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!sdd.hp.com!think.com!ames!lll-winken!iggy.GW.Vitalink.COM!pacbell.com!pacbell!rtech!mtxinu!taniwha!paul
From: paul@taniwha.UUCP (Paul Campbell)
Newsgroups: comp.lang.misc,comp.arch
Subject: Re: Algol68
Message-ID: <809@taniwha.UUCP>
Date: 7 Apr 91 03:48:24 GMT
References: <9168@castle.ed.ac.uk> <4202@zaphod.UUCP> <801@taniwha.UUCP> <4217@zaphod.UUCP>
Reply-To: paul@taniwha.UUCP (Paul Campbell)
Organization: Taniwha Systems Design, Oakland
Lines: 41