Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!panda!genrad!decvax!bellcore!ulysses!burl!clyde!watmath!watnot!watdragon!daford From: daford@watdragon.UUCP (Daniel Ford) Newsgroups: net.micro Subject: Re: pascal-->C translator Message-ID: <1378@watdragon.UUCP> Date: Wed, 10-Sep-86 18:03:57 EDT Article-I.D.: watdrago.1378 Posted: Wed Sep 10 18:03:57 1986 Date-Received: Thu, 11-Sep-86 07:34:54 EDT References: <3544@brl-smoke.ARPA> <1590001@hpl-opus.HP.COM> Organization: U of Waterloo, Ontario Lines: 13 I wrote a Genuine PASCAL to C "converter" (compiler!) as part of a compiler used to automatically generate communication protocols from an extended state machine description. My conclusions at the end of my task was that it was "easy" but.... The major problems if I remember correctly were in dealing with nested routines (i.e. one routine defined inside another) and the scope of variables with in these types of structures. I ended up renaming things in a uniquie systematic way and then declaring (for variables) them to be external. Other problems arose in trying to deal with the different formats of I/O statments. Generally one Pascal write statment converted into one or more C printf's. There were other problems but mostly it was just straight text translation. My preference would be to use a text editor to do the job. Daniel Ford