home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!yorkohm!minster!dan
- From: dan@minster.york.ac.uk
- Newsgroups: comp.programming
- Subject: Re: A LITTLE BRAIN... in parallel II
- Message-ID: <714157041.3953@minster.york.ac.uk>
- Date: 18 Aug 92 16:57:21 GMT
- Organization: Department of Computer Science, University of York, England
- Lines: 29
-
- OK... for all of you who didn't spot the mistake this it the correct
- version:
-
- END = p? -> d! -> SKIP
- P = input?ch ->
- IF ch == <CR>
- (f:M_META//(f.nw? -> p! -> d? -> output!ch -> nw! -> SKIP))
- ELSIF ch == <SPACE>
- p! -> d? -> output!ch -> nw! -> SKIP
- ELSE
- (n:P //(n.p? -> p! -> d? -> output!ch -> n.d! -> SKIP))
- M_META = END || P
-
- META = ((nw? -> SKIP) || M_META) -> META
-
- I know that the mistake was obvious and I am quite embarased! (for those
- who didn't see it : the previous wersion worked for 2 words only (and
- for 42 sentences, for infinitie value of 42; as long as the sentences
- were 2 words long. Any longer sentences were truncated: BAZ BAR FOO
- became FOO BAR.)
-
- Some of you might complain that I didn't bother with proper formating.
- That is left as an easy exercise for the reader.
-
- Daniel Kustrin
- Distributed Ada Debugging Group
- University of York
- York, England
- dan@minster.york.ac.uk
-