Re: Parsing text files with standard words
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Parsing text files with standard words         

Group: comp.lang.forth · Group Profile
Author: Gerry
Date: Sep 18, 2008 13:47

On 18 Sep, 21:11, coos wrote:
> Op Thu, 18 Sep 2008 12:55:58 -0700 (PDT) schreef Gerry:
>
>
>
>> On 17 Sep, 21:32, an...@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>
>> [...]
>
>>>>Also it precludes a
>>>>design where an application opens a file source and then returns
>>>>to whatever called it to parse and process the file.
>
>>> No. EXECUTE-PARSING-FILE takes a file-id, so your application would
>>> open the file, then pass the resultin file-id to its caller, which
>>> would then call EXECUTE-PARSING-FILE.
>
>> Well yes, but the point I tried to make was that the caller of
>> EXECUTE-PARSING-FILE loses control until the word executed
>> (xyz-helper in your example) has completed, whereupon the file
>> is closed. So the caller cannot process the file itself.
>
> I don't understand this. The caller delegates the processing of the file to
> xyz-helper via execute-parsing-file.

With EXECUTE-PARSING-FILE the caller is forced to delegate the
processing to xyz-helper, he has no choice in the matter. This
is not so with FILE-SOURCE.
> So it's not the caller that performs
> the processing. It's simple to rewrite xyz-helper to do what you want.
>

That is true. I'm not saying that such delegation is a bad idea,
but I'd rather the system didn't dictate the design of my software.

Gerry
no comments
diggit! del.icio.us! reddit!