corbett@beatnix.UUCP (Bob Corbett) (02/18/89)
Even though this message, deals with Pascal, I am crossposting it to comp.lang.modula2, since Modula users may have useful experience concerning the matters under consideration. For the past two months, I have been trying to find a good way of implementing separate compilation for draft proposed American National Standard (dpANS) Extended Pascal. I hoped to find a better way than having the compiler maintain an interface file or module library. I have used such systems, and I did not find them pleasant to use. However, after posting a half dozen proposals and having them all shot down, I give up. The dpANS seems to prohibit any mechanism I like better than interface files or module libraries. There, I am resigned to using interface files. In my system, all interface files will be the named ".pascal". Whenever the compiler is invoked, it will read the interface information from the .pascal file in the current working directory before starting compilation. After a file has been successfully compiled, any interface information gleaned from it will be added to the interface file. If errors occur during compilation, the interface file will not be altered. Whenever a file whose filename component is the same as the filename component of a previously compiled file is compiled, the interface information from that previous compilation is deleted. (That last sentence reads like a sentence from the proposed standard.) I would appreciate suggestions regarding what an interface file should contain and how it should be formatted. I would also like to know what commands I should provide for manipulating interface files. I am currently planning to have the compiler read and process the entire interface file before starting compilation. I am assuming that interface files are usually small. If you have experience with a compiler that creates interface files, please let me know if my assumption is correct. Finally, if you knows a better way of implementing separate compilation for Extended Pascal, please send me a description of it. Yours truly Bob Corbett uunet!elxsi!corbett ucbvax!sun!elxsi!corbett