From: Grzegorz J. <ja...@he...> - 2003-03-13 06:30:28
|
Hi, In his e-mail Stefan Reuther offered several patches to OpenC++ parser. Those patches are welcome, however I think we again hit recurring problem: Conceptually OpenC++ consists of three sybsystems: Frontend --- reads preprocessed sources, makes parse tree out of them; possibly OpenC++ static analyzer also belongs in this subsystem Translator --- traverses syntax tree and transforms it according to rules described by metaclasses Driver --- runs preprocessor, Frontend, Translator, native compiler and linker. As I understand Michael and Stefan work with Frontend and are not interested in the rest of the system. I believe, that this is the most frequently reused part of OpenC++ and I know of at least three more projects that reuse just this part. Thus I suggest that we take it out and make it a separate library. Otherwise I can see serious problems with testing. As you now, out present methodology is regression testing, e.g. we run 'make test' each time we modify anything. This is very important, as this allows somebody who is not a guru to come and commit some fixes without fear that he/she breaks some distant parts of the package. Our testsuite is pathetically small at the moment, but it already helps and I believe that it can grow. But now comes the problem: when we just extend Frontend itself, without proper support in Translator (e.g. your patches will make 'if ({...}) ' parse, but Translator will choke on it), we do not have way to add tests that make sure the new Frontend functionality works. With separate Frontend library, we can test the library on its own, and this is what we need at the moment, because we somehow have to add tests for the new features implemented by patches from Fiasco project. BTW: Over a year ago there was a resolution on this forum to factor out the Driver subsystem and make it a shell script (for easier maintenance and to make underlying compiler/preproc/linker settable with Autoconf). Let me know what you think. Best regards Grzegorz ################################################################## # Grzegorz Jakacki Huada Electronic Design # # Senior Engineer, CAD Dept. 1 Gaojiayuan, Chaoyang # # tel. +86-10-64365577 x2074 Beijing 100015, China # # Copyright (C) 2002 Grzegorz Jakacki, HED. All Rights Reserved. # ################################################################## |