I am looking at using the front end of the GPC as a starting point for a Pascal to C++ converter. I am aware that there are pascal to C converters in existance, but the code they produce is in general code that only a C compiler can understand. My intension is to produce maintainable code, and I am helped by the fact that the starting point is a particular body of code over which I have some control and can be hacked before and after if necessary. What I would like (besides advice and guidance) is a good description of the intermediate data structure generated by the front end of the GPC (and GCC) compilers. A few months ago (when I was first considering this) I found a wonderful web site (in Sweden, I think) that described this beatifully. Since then, however, this computer has been upgraded, rebuilt, and generally hacked around and I have lost the link. Help?
Peter.
-----
"Time is an illusion. Launch times doubly so"
Pascal to C++ converter. I am aware that there are pascal to C converters in existance, but the code they produce is in general code that only a C compiler can understand.
Well, C being a subset of C++, your C++ compiler should be able to eat that code, unless your C++ compiler is busted. I know *my* C++ compiler will eat p2c output.
I agree with you that the code they produce isn't exactly maintainable. No argument there, so there is definately some room for improvement on that front. The only time I use them is if I continue to maintain the code in pascal, using p2c only as a "compiler" - becoming less and less useful in itself with working versions of gpc.
-Bob
-- Bob Beck Computing and Network Services beck@bofh.ucs.ualberta.ca University of Alberta True Evil hides its real intentions in its street address.