Hi all,
this is me, Sven Schubert, 25 yo German and student of 'Software-Engineering' at the Institute of Technology Carlow, Ireland. My final year project is to come up with a Pascal compiler for the Parrot VM (www.parrotcode.org).
While researching ways on how to do my project (i.e. write a new compiler from scratch or modifiy existing OSS-compilers to target Parrot), of course GPC was one of the open-source compilers I looked at. Now, I'm not exactly literate in compiler building and I could use some guidance regarding where to look at in GPC.
Naturally, I'm looking for the Backend module of GPC, that would translate the intermediate representation into whatever its target language is. Because I guess, thats where I would have to start changing things (c:
Can anyone point me, what part of the GPC source to look at? Anyone done anything similar in the past? As I'm still researching, I could use some third-party opinion on the feasability of modifying GPC instead of writing a new Pascal compiler from scratch.
Any suggestions welcome.
Thanks & cheers, Danke und viele Gruesse,
Sven.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
GPC uses the GCC compiler suite as a backend, and requires the GCC source to be compiled. This has the side benefit that a well-done backend for any particular assembly language (such as Parrot) could potentially bring with it not only Pascal, but also C, C++, Objective C, Ada, and a variety of other languages for which GCC front ends exist.
Might be nice for impressing your professors...
On Jan 21, 2005, at 11:49 AM, Sven SCHUBERT wrote:
Hi all,
this is me, Sven Schubert, 25 yo German and student of 'Software-Engineering' at the Institute of Technology Carlow, Ireland. My final year project is to come up with a Pascal compiler for the Parrot VM (www.parrotcode.org).
While researching ways on how to do my project (i.e. write a new compiler from scratch or modifiy existing OSS-compilers to target Parrot), of course GPC was one of the open-source compilers I looked at. Now, I'm not exactly literate in compiler building and I could use some guidance regarding where to look at in GPC.
Naturally, I'm looking for the Backend module of GPC, that would translate the intermediate representation into whatever its target language is. Because I guess, thats where I would have to start changing things (c:
Can anyone point me, what part of the GPC source to look at? Anyone done anything similar in the past? As I'm still researching, I could use some third-party opinion on the feasability of modifying GPC instead of writing a new Pascal compiler from scratch.
Any suggestions welcome.
Thanks & cheers, Danke und viele Gruesse,
Sven.
-- Sven Schubert I.T. Carlow - Software Engineering mobile: +353 85 7169848
- ----------------------------------------------------------- Frank D. Engel, Jr. fde101@fjrhome.net
$ ln -s /usr/share/kjvbible /usr/manual $ true | cat /usr/manual | grep "John 3:16" John 3:16 For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life. $
___________________________________________________________ $0 Web Hosting with up to 120MB web space, 1000 MB Transfer 10 Personalized POP and Web E-mail Accounts, and much more. Signup at www.doteasy.com
Sven SCHUBERT wrote:
this is me, Sven Schubert, 25 yo German and student of 'Software- Engineering' at the Institute of Technology Carlow, Ireland. My final year project is to come up with a Pascal compiler for the Parrot VM (www.parrotcode.org).
I have no idea what that is, but I suspect it is something like the stack based virtual machine used for the P4 portable compiler. You could get it's source and modify. For student purposes you might be well advised to look at Pascal-S, a subset compiler. In fact, P4 also is a subset, but a substantially larger one.
If I hadn't lost the sources my PascalP (evolved from P4) and it's various code-generators would be ideal. All it would need is a further code-generator.