home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / programm / 2371 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.3 KB

  1. Path: sparky!uunet!mcsun!uknet!yorkohm!minster!dan
  2. From: dan@minster.york.ac.uk
  3. Newsgroups: comp.programming
  4. Subject: Re: A LITTLE BRAIN... in parallel II
  5. Message-ID: <714157041.3953@minster.york.ac.uk>
  6. Date: 18 Aug 92 16:57:21 GMT
  7. Organization: Department of Computer Science, University of York, England
  8. Lines: 29
  9.  
  10. OK... for all of you who didn't spot the mistake this it the correct
  11. version:
  12.  
  13. END = p? -> d! -> SKIP
  14. P   = input?ch ->
  15.     IF ch == <CR>
  16.         (f:M_META//(f.nw? -> p! -> d? -> output!ch -> nw! -> SKIP))
  17.      ELSIF ch == <SPACE>
  18.             p! -> d? -> output!ch -> nw! -> SKIP
  19.       ELSE
  20.         (n:P //(n.p? -> p! -> d? -> output!ch -> n.d! -> SKIP))
  21. M_META = END || P
  22.  
  23. META = ((nw? -> SKIP) || M_META) -> META
  24.  
  25. I know that the mistake was obvious and I am quite embarased! (for those
  26. who didn't see it : the previous wersion worked for 2 words only (and
  27. for 42 sentences, for infinitie value of 42; as long as the sentences
  28. were 2 words long. Any longer sentences were truncated: BAZ BAR FOO
  29. became FOO BAR.)
  30.  
  31. Some of you might complain that I didn't bother with proper formating.
  32. That is left as an easy exercise for the reader.
  33.  
  34.                        Daniel Kustrin
  35.               Distributed Ada Debugging Group
  36.                      University of York
  37.                        York,  England
  38.                    dan@minster.york.ac.uk
  39.