From: James M. D. <mdu...@ya...> - 2003-03-20 11:26:27
|
--- Grzegorz Jakacki <ja...@he...> wrote: > On Tue, 18 Mar 2003, Stefan Reuther wrote: > > > Hello, > > > > On Mon, Mar 17, 2003 at 04:43:53PM +0800, Grzegorz Jakacki wrote: > > > On Fri, 14 Mar 2003, Stefan Reuther wrote: > > > > I think, there are two problems, at least with the parser. The > > > > interface consists of two parts, namely the Ptree descendants > > > > and their contents. > > > > > > > > 1) Every Ptree descendant has a method "Translate" which calls > > > > a method of Walker. Adding a new Ptree class means adding a > > > > method to Walker. > > > > > > This is the first sign of too little isolation between visitor > (Walker) > > > and visited class hierarchy (Ptree and derived classes) --- you > cannot > > > extend Ptree hierarchy without modifying Walker code. > > > > I don't think it can be done much different. Ptree and Walker > > have to "know each other". > > I believe that it is possible to introduce a layer in between, > which would encapsualte the actual implementation of Ptree. Exactly my thoughts. We need a cleaner tree. Have you looked at treecc from Rhys W? http://www.southern-storm.com.au/treecc.html ===== James Michael DuPont http://introspector.sourceforge.net/ __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |