home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / rexx / 929 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  3.6 KB

  1. Path: sparky!uunet!gatech!concert!borg!news_server!martinc
  2. From: martinc@grover.cs.unc.edu (Charles R. Martin)
  3. Newsgroups: comp.lang.rexx
  4. Subject: Re: Blanks, REXX, and portability...
  5. Message-ID: <MARTINC.92Sep7195833@grover.cs.unc.edu>
  6. Date: 7 Sep 92 23:58:33 GMT
  7. References: <REXXLIST%92090701365930@UGA.CC.UGA.EDU>
  8.     <MARTINC.92Sep7110759@grover.cs.unc.edu>
  9.     <1992Sep7.191217.1@sejnet.sunet.se>
  10. Sender: news@cs.unc.edu
  11. Organization: UNC Department of Computer Science
  12. Lines: 67
  13. In-reply-to: eric@sejnet.sunet.se's message of 7 Sep 92 19:12:17 GMT
  14.  
  15. In article <1992Sep7.191217.1@sejnet.sunet.se> eric@sejnet.sunet.se (Eric Thomas) writes:
  16.  
  17.    In article <MARTINC.92Sep7110759@grover.cs.unc.edu>, martinc@grover.cs.unc.edu (Charles R. Martin) writes:
  18.    > I think the contention is that
  19.    > 
  20.    > parse arg a b c
  21.    > 
  22.    > ought to be a synonym for 
  23.    > 
  24.    > parse upper arg with a<<\b|\t>+>b<<\b|\t>+>c
  25.    > 
  26.    > Now if we had that, I don't see immediately what the need for parse
  27.    > expand would be;
  28.  
  29.    Conversely, given PARSE EXPAND I don't see what the need for changing
  30.    the definition of all functions which deal with words,
  31.    leading/trailing blanks and so on would be. Compatibility with prior
  32.    applications is guaranteed, and the language only needs to be changed
  33.    in one place.
  34.  
  35. But as I noted before, if the reg exp syntax is a strict extention, then
  36. there shouldn't be any affect on exsiting functions.  (In fact, having a
  37. reg exp extention might be the answer to the non-IBM world's problems
  38. with parse expand.)
  39.  
  40. But, tell me -- is parse expand actually part of rexx already?  I can't
  41. seem to find it in the documentation I have.  Are we in a battle of the
  42. competing extentions, or is it already part of usual rexx?
  43.  
  44.    > in fact, given that the simple identity doesn't hold
  45.    > after parse expand, maybe the whole idea is broken.
  46.  
  47.    PARSE does not respect identity when using word parsing (ie PARSE
  48.    something A B as opposed to column or literal string parsing),
  49.    because it quietly removes an arbitrary amount of blanks. The only
  50.    case where identity is preserved is when you do not use word parsing.
  51.    This is true regardless of the definition you use for white space.
  52.  
  53. Then what's the objection to making whitespace remove an arbitrary
  54. number of blanks and tabs?  What existing programs does it break?
  55.  
  56.    > But the idea of embedded general regular expressions in parse is such a
  57.    > nice one, and seems like such a natural extension to the existing parse,
  58.    > that I think it ought to be seriously considered.
  59.  
  60.    > parse upper arg with a<<\b|\t>+>b<<\b|\t>+>c
  61.  
  62.    Nice? Natural? I see.
  63.  
  64. If you don't like the syntax, well, I never claimed that this was good
  65. syntax.  (Of course, you've elided the part where I said that.)  As far
  66. as it's niceness and naturalness, it is at least nice and natural to
  67. anyone with a competent education in computer science; since (as I said
  68. and you elided again) the point of the notation was to make precise a
  69. concept that had up to then been imprecise, I don't see an objection;
  70. and if the notation used for reg exps is nicely done, those who don't
  71. want to have to deal with such a complicated idea as regular sets can
  72. just ignore them.
  73. --
  74. Charles R. Martin/(Charlie)/martinc@cs.unc.edu/(ne crm@cs.duke.edu) 
  75. O/Dept. of Computer Science/CB #3175 UNC-CH/Chapel Hill, NC 27599-3175
  76. H/3611 University Dr #13M/Durham, NC 27707/(919) 419 1754
  77. ----------------------------------------------------------------------
  78. "I am he who walks the States with a barb'd tongue, questioning every
  79. one I meet,/Who are you that wanted only to be told what you knew
  80. before?/ Who are you that wanted only a book to join you in your
  81. nonsense?"  _Leaves of Grass_ xxiii.4.
  82.