Hi Larry: plug-and-play visitors is actually a very good name for the new visitors. Thank you. >With PnP visitors, there could be a default null visitor and/or a source >visitor. These could be setup to return test patterns in certain cases. This reminds me of the David Lorenz paper. What do you think would be a useful family of generic visitors, such as null visitor, display visitor, summing visitor etc? >2) Is there a way to setup cd file syntax to include a "junk" object with >start and stop token? Right now, as you told me, there is a text object >but that must start and end with (@ and @) respectively. I would like some >way to specify the start and stop tokens in the cd file. This would allow a >way to grow cd files with no change in the input. (Would have very helpful >during my project.) Doug knows JavaCC much better. I let him answer this part. >3) Parameterizing visitor classes: Can you specify the "through" targets >in addition to the "to" target. Also, what happens when there are multiple >"to" targets. A very good question! The solution is to introduce strategy types. That is something we could pursue in a joint Draper/Demeter team project. -- Karl From ldodds@draper.com Mon Dec 8 16:17:41 1997 Date: Mon, 08 Dec 1997 16:16:08 -0500 From: Larry Dodds Subject: Random issues To: lieber@ccs.neu.edu Prof, A couple of random comments. 1) Plug-and_Play (PnP) visitors: I figured out why the PnP visitors (with next.return()) are not exactly like a container of objects. When you have a bunch of contained objects, they all of multiple messages. If you let each object start calling multiple of each others messages, you end with a mess that forces those objects to only be used together. In the PnP visitor case, there is really only one message that is being called. If you forced a container to coordinate the visitors, it would only be handling that one message (an additional level of unneeded overhead). With PnP visitors, there could be a default null visitor and/or a source visitor. These could be setup to return test patterns in certain cases. 2) Is there a way to setup cd file syntax to include a "junk" object with start and stop token? Right now, as you told me, there is a text object but that must start and end with (@ and @) respectively. I would like some way to specify the stat and stop tokens in the cd file. This would allow a way to grow cd files with no change in the input. (Would have very helpful during my project.) 3) Parameterizing visitor classes: Can you specify the "through" targets in addition to the "to" target. Also, what happens when there are multiple "to" targets. Larry ------------------------------------------------- Larry Dodds Draper Laboratory MS 3K 555 Technology Square Cambridge, MA 02139 617-258-2253 617-258-1729 (FAX) ldodds@draper.com