Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!rochester!bullwinkle!batcomputer!garry From: garry@batcomputer.TN.CORNELL.EDU (Garry Wiegand) Newsgroups: net.lang Subject: PL/1 -> C translation Message-ID: <456@batcomputer.TN.CORNELL.EDU> Date: Tue, 1-Apr-86 22:07:34 EST Article-I.D.: batcompu.456 Posted: Tue Apr 1 22:07:34 1986 Date-Received: Sat, 5-Apr-86 08:22:58 EST Reply-To: garry%geology@cu-arpa.cornell.edu.arpa Organization: Cornell Engineering && Flying Moose Graphics Lines: 55 In a recent article segedy@gsg.UUCP (Catherine Segedy) wrote: >... I am trying to find information about PL/1 compilers under Unix and >PL/1 to C translators. Can anyone help me ? ... You just joggled my "to-do" list! I posted the translator question a couple months ago - here's a summary of the replies (much thanks to all!): ** Mike Pique (mp@unc.csnet, UNC Comp Sci Dept, Chapel Hill, NC 27514 (919) 966-5053) said: A team of 4 undergraduates here few years ago built 'pltoc', a PL/I-to-C translation *AID* (repeat aid, not *translator*!) It does the grunge work (converting array refs from () to [], changing order of keywords in declarations and unwinding attribute factoring, [e.g., DECLARE ( ( ( A EXTERNAL), (B AUTOMATIC) ) BINARY) FLOAT); ], selecting C types most closely corresponding to PL/I types), you do the intellectual stuff (deciding how to simulate/implement ON-conditions, ALLOCATE/FREE, GET/PUT/READ/WRITE, and much more). It's 1300 lines of YACC, 400 lines of LEX, 800 lines of C, and 20 lines of SHELL. Runs on VAX 4BSD, probably too large for PDP-11 but we haven't tried. Was built spring 1981 by a student team here and is more a research tool than a production program, but it does help: I've pushed thousands of lines of PL/I through it. If you want a 'tar' tape or more info, write or phone. ** Laura Creighton (ihnp4!l5!laura) said: Converting PL/1 to C is very hard by hand. I converted a whole lot of sp/k (a U of T subset of PL/1) into C a long time ago. I couldn't do it by hand -- it was faster to write a translator! I don't think that I still have the translator, but even if I did it won't be much use to you since it generated v6 style C, and doesn't handle most of the hard part of PL/1. ** And lastly, Craig Jackson ({ihnp4!linus,seismo!harvard}!axiom!mhis!dricej, {dual,hplabs,ptsfa,lll-crg}!well!cej) said: About a PL/I to C translator: Lexeme Corp., of Pittsburgh, PA, does translations like that. They don't actually like to sell their translator; the would prefere to contract to translate a given program. They want moderate bucks for this ($1-$4 per line). I don't have their address here, but they're associated with Unilogic, the Scribe folks. *********** In my own case, we decided this was a glorious opportunity - not to be wasted - to do a full rewrite. So in the end we did not actually do any mechanized translation (the DECLARE's are the hard part!) Hope this helps someone - garry wiegand (garry%cadif-oak@cu-arpa.cornell.cs.edu)