giw@allegra.UUCP (Jerry Weil) (12/17/87)
Does anyone know of software to translate Pascal to C while maintaining comments? Any pointers to sources would be appreciated. - Jerry Weil (allegra!giw) [I hear that Whitesmith's Pascal compiler translates to C, then compiles the C, but I've no direct experience of it. -John] -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request
giw@allegra.UUCP (Jerry Weil) (12/17/87)
Does anyone know of software for converting Pascal to C while maintaining comments? Any pointers to sources would be appreciated. - Jerry Weil (allegra!giw)
rsalz@BBN.COM (Rich Salz) (12/19/87)
There was a Pascal to C translator published in comp.sources.unix a couple of months ago. Don't remember about the comments, tho. /r$ -- For comp.sources.unix stuff, mail to sources@uunet.uu.net. -- Send compilers articles to ima!compilers or, in a pinch, to Levine@YALE.EDU Plausible paths are { ihnp4 | decvax | cbosgd | harvard | yale | bbn}!ima Please send responses to the originator of the message -- I cannot forward mail accidentally sent back to compilers. Meta-mail to ima!compilers-request
ftw@datacube.UUCP (12/22/87)
Whitesmiths has a Pascal to C translator, and if memory serves, it does indeed preserve comments. However, it is commercial product. They have versions of that translator that can target a "standard" U*ix C compiler, or a Whitesmiths C compiler. ... #include <disclaimer.h> Farrell T. Woods Datacube Inc. Systems / Software Group 4 Dearborn Rd. Peabody, Ma 01960 VOICE: 617-535-6644; FAX: (617) 535-5643; TWX: (710) 347-0125 INTERNET: ftw@datacube.COM UUCP: {rutgers, ihnp4, mirror}!datacube!ftw "OS/2 -- Half an operating system"
mccaugh@uiucdcsb.cs.uiuc.edu (12/27/87)
What? No description of the translation? Just curious as to what one should expect from such translation, as it proceeds from a totally block-structured (but not necessarily separate-compilable) language to a non-block-structured (but independently-compilable) language. My guess is that in going from P to C, internal routines must get their environment preserved -- presumably -- by "struct's", which carry externally-known identifiers inward; otherwise, I suspect much indirection on the part of globally-declared pointers playing the role of a 'display'. The only alternative would be much resort to para- meter passing, which overhead I suspect this translator seeks to avoid.