Xref: utzoo comp.lang.misc:7155 comp.arch:21711 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!linac!att!ucbvax!mtxinu!taniwha!paul From: paul@taniwha.UUCP (Paul Campbell) Newsgroups: comp.lang.misc,comp.arch Subject: Re: Algol68 Message-ID: <801@taniwha.UUCP> Date: 29 Mar 91 00:01:18 GMT References: <1991Mar11.123405.17814@bellcore.bellcore.com> <9168@castle.ed.ac.uk> <4202@zaphod.UUCP> Reply-To: paul@taniwha.UUCP (Paul Campbell) Organization: Taniwha Systems Design, Oakland Lines: 54 In article <4202@zaphod.UUCP> bobd@zaphod.UUCP (Bob Dalgleish) writes: >Pascal was designed by Wirth after he got disgusted with the rapidly >growing size and complexity of the Algol68 effort. I gave up in disgust I did and Algol68 implementation as my MSc project, almost 10 years ago now (I wish I'd had C to implement it in - it might still be useable :-) I always had the idea that what Wirth did was implement all the 'easy' stuff in Pascal. >implementing a full compiler told me made my hair stand on end. In >fact, the stories are very similar to the ones I heard about Ada. The >overloaded operators, partial parametization, and array slices explored >the very horizons of computer science capability. Actually most of this stuff wasn't that hard to implement, what I found really interesting was reading the papers being written by the people implementing Ada - they were solving many of the same problems (and making many of the same mistakes) that the Algol68 implementors had solved a decade before - I think that a lot was learned from Algol68 in the field of language design and a lot was missed in actual implementation. In my opinion the major thing 'wrong' with Algol68 is that it is not easy to approach with modern compiler tools - modern language designers tend to choose grammers that are lr0 (or slr/whatever) because they want them to go through yacc. Algol68 really has 2 grammers embedded inside each other (expressions and parentheses) you can't parse one untill you've parsed the other. The report(s) are hard to read, you keep getting that same sort of 'aha!' reaction you get in v6 unix when you finally figure out what's ment by "you're not expected to understand this". By the way - for the record if you ever have to implement operators with changing priorities (ala A68/Ada) it's easy, create a production for expressions: E := E OP E This of course gives a shift/reduce conflict on OP - just have the parser generator note it as such, and at run time compare the priorities of the stacked OP and the one about to be shifted, use this information to decide whether to shift or reduce (ie resolve the conflict at run-time). Paul -- 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"