home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!concert!borg!news_server!martinc
- From: martinc@grover.cs.unc.edu (Charles R. Martin)
- Newsgroups: comp.lang.rexx
- Subject: Re: Blanks, REXX, and portability...
- Message-ID: <MARTINC.92Sep8132954@grover.cs.unc.edu>
- Date: 8 Sep 92 17:29:54 GMT
- References: <1992Sep6.022654.1@sejnet.sunet.se> <19920907131702SEB1525@MVS.draper.com>
- <1992Sep8.154048.1@sejnet.sunet.se>
- Sender: news@cs.unc.edu
- Organization: UNC Department of Computer Science
- Lines: 57
- In-reply-to: eric@sejnet.sunet.se's message of 8 Sep 92 15:40:48 GMT
-
- In article <1992Sep8.154048.1@sejnet.sunet.se> eric@sejnet.sunet.se (Eric Thomas) writes:
-
- In article <19920907131702SEB1525@MVS.draper.com>, SEB1525@MVS.draper.com (Steve Bacher) writes:
- > At least with the more reasonable proposals,
- >
- > PARSE VALUE DIAG(something) WITH var1 var2 '15'x var3 var4 '15'x var5
- >
- > should continue to work just fine, regardless of whether '15'x is
- > considered whitespace or not. A correct implementation of REXX will
- > break up the line at the '15'xes and only then perform the whitespace
- > analysis on the resulting pieces.
-
- Yes, that much will work, and it is indeed what people generally code
- to process the output of commands which produce a fixed-size answer
- (like when extracting the time zone name from QUERY TIME). But there
- are many commands which produce variable-size output that one
- processes in a loop (example: QUERY NAMES). What bothers me is that
- we now have '15'x = ' ', a situation most programmers must NOT have
- quite expected. My own programs would not be affected since I always
- use ==, but the amount of spontaneous religious flames I get about
- this usage from people who have read my code for the first time
- suggests that most programmers do use = and thus their programs would
- break.
-
- Hmmm. It seems as if there are multiple topics in this, all
- confabulated together.
-
- (1) Should newline be considered a whitespace character, or more
- generally should the rexx definition of whitespace be equivalent to
- anything for which unix isspace() returns 1?
-
- I think the answer is "no". Even other UNIX languages that are line-
- oriented (like awk) don't do this. It's clear that for any language
- serving similar purposes to rexx and awk, newline must be distinguished
- from Blank, tab, formfeed, VT etc.
-
- (2) Should parse (and WORDS, WORDPOS, etc) be extended or modified to
- make any arbitrary whitespace a word separator?
-
- I've already argued that it is more orthogonal and more uniform to
- answer "yes".
-
- (3) Should parse be extended with some kind of general regular
- expression mechAnism?
-
- I think it's worth seriously considering -- before I fell asleep last
- night I got thinking about some of the things one could do with an
- appropriate rexexp parse, and it's pretty exciting.
- --
- Charles R. Martin/(Charlie)/martinc@cs.unc.edu/(ne crm@cs.duke.edu)
- O/Dept. of Computer Science/CB #3175 UNC-CH/Chapel Hill, NC 27599-3175
- H/3611 University Dr #13M/Durham, NC 27707/(919) 419 1754
- ----------------------------------------------------------------------
- "I am he who walks the States with a barb'd tongue, questioning every
- one I meet,/Who are you that wanted only to be told what you knew
- before?/ Who are you that wanted only a book to join you in your
- nonsense?" _Leaves of Grass_ xxiii.4.
-