From: James M. D. <mdu...@ya...> - 2003-04-14 12:03:24
|
--- Stefan Reuther <sr...@ma...> wrote: > Hi *.*, > > On Wed, Mar 19, 2003 at 01:38:26PM +0800, Grzegorz Jakacki wrote: > > On Tue, 18 Mar 2003, Stefan Reuther wrote: > > > 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. > > Another possibility would be to put that knowledge into the > Walker interface. Here, we have such a thing for > PtreeDeclaration. Depending upon whether a PtreeDeclaration is a > class declaration ("class foo;"), a name declaration ("int x;") > or a function implementation ("void x() { }"), it nicely > dissects the tree node and calls different functions. "Class" > and "ClassWalker" already seem to do some other parts of this. The walker has only one problem. It does not only walk, but also has to interpret things. It has to know how to extract the data out of the parser How do you propose to hide the details of the parser from the walker? mike ===== James Michael DuPont http://introspector.sourceforge.net/ __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com |