Hmmm ... Do you perhaps want a P4 P-Code to 386 translation scheme instead? I'm assuming here that P4000 is some derivative of the P4. Since you already have a front-end, it may be easier to translate it's output to 386 as a separate program, instead of modifying the existing "front-end". Perhaps someone here may know of existing code to perform such a translation or at least know where to find decent documentation of the P4 P-Code (BTW, if so, I may be interested too;-).
Joe.
-----Original Message----- From: a2782@dis.ulpgc.es [SMTP:a2782@dis.ulpgc.es] Sent: Thursday, December 12, 2002 10:56 AM To: gpc@gnu.de Subject: Translation Scheme
Didn't you go to school? :) Weren't you ordered to make a simple compiler which accepted a Pascal subset and generated machine code?
I will tell you why do I want this translation scheme. I am involved in a project in which one of its steps is taking a compiler of a language called 'LC99' (it is very close to Pascal or Algol) which actually generates P-Code (from Pascal compiler P4000) and change it in order to make it generates i386 code. It's the first time I make a pure back-end (I've been always working on front-ends, which make me happier :). I am not interested in optimizations, because my project has only academical purposes (it's a visualizator of memory implemented over GDB).
Of course, implementation of GPC (front-end+Tree+RTL+back-end) crashes with I want to get (lex,parser,semant-->code). I knew it. But I thought any of you had some experience in something like this.
Many thanks to Marcel, Frank Heckenbach, Waldek Hebisch, Russell Whitaker, Maurice Lombardi and The African Chief (who has a Pascal-to- 386 compiler which may be helpful to me). Thanks indeed to Joe da Silva ;P.
Ciao!
modifying the existing "front-end". Perhaps someone here may know of existing code to perform such a translation or at least know where to find decent documentation of the P4 P-Code (BTW, if so, I may be interested too;-).
I still have a copy of the Portable Pascal (P4) compiler and the P4 interpretor. I also have a copy of the Path Pascal compiler and interpretor! (Path Pascal added processes and objects, and path expressions. A path expression a description of how public elements of an object are syncronized for concurrent access.)
--Phil
know where to find decent documentation of the P4 P-Code (BTW,
I forgot to mention that I still have the documentation booklet that came with the Portable Pascal Compiler.
--Phil
"da Silva, Joe" wrote:
Hmmm ... Do you perhaps want a P4 P-Code to 386 translation scheme instead? I'm assuming here that P4000 is some derivative of the P4. Since you already have a front-end, it may be easier to translate it's output to 386 as a separate program, instead of modifying the existing "front-end". Perhaps someone here may know of existing code to perform such a translation or at least know where to find decent documentation of the P4 P-Code (BTW, if so, I may be interested too;-).
PLEASE do not toppost.
See "PASCAL, The Language and its Implementation", edited by D.W.Barron. Wiley 1981, ISBN 0 471 27835 1. The chapter involved is "Pascal-P Implementation Notes", by Nori, Ammann, Jensen, Nageli and Jacobi.
For a compiler that generates somewhat similar code, and runs under MsDos/Windoze, see the download section of my site, URL below. It is a descendant of P4, and is almost fully ISO7185 compliant. No procedural parameters, no gotos out of procedures.
Mensaje citado por: "da Silva, Joe" Joe.daSilva@emailmetering.com:
Hmmm ... Do you perhaps want a P4 P-Code to 386 translation scheme instead? I'm assuming here that P4000 is some derivative of the P4. Since you already have a front-end, it may be easier to translate it's output to 386 as a separate program, instead of modifying the existing "front-end". Perhaps someone here may know of existing code to perform such a translation or at least know where to find decent documentation of the P4 P-Code (BTW, if so, I may be interested too;-).
It would be another option, but I think it's more difficult to find this converter... At least I have not found it...