home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.rexx
- Path: sparky!uunet!usc!news.bbn.com!noc.near.net!ns.draper.com!news.draper.com!MVS.draper.com!SEB1525
- From: SEB1525@MVS.draper.com (Steve Bacher)
- Subject: Re: PARSE wishlist/brainstorming
- Message-ID: <19920827084628SEB1525@MVS.draper.com>
- Sender: MVS NNTP News Reader <NNMVS@MVS.draper.com>
- Nntp-Posting-Host: mvs.draper.com
- Organization: Draper Laboratory
- References: <1992Aug24.193441.9572@hou.amoco.com>
- Date: Thu, 27 Aug 1992 13:46:00 GMT
- Lines: 47
-
- In article <1992Aug24.193441.9572@hou.amoco.com>,
- zjlc12@hou.amoco.com (Jerry Campbell) writes:
-
- >I may retract my original idea. Perhaps some new parsing template elements?
- >
- > Parse Var stream With Stem "fruits:" nuts.(iterative_stem_template)
- >
- >Where iterative template could contain strings that would mean, iterate on the
- >stem when this string is encountered. Or numbers which would be somewhat similar
- >to the existing N or +N elements. Only N means start at stem index N and
- >+N means iterate over the stem N times.
- >
- > stream = "fruit: apple, orange, plums, banana" ,
- > "nuts: walnut, almond, filbert"
- >
- > Parse Var stream With Stem "fruit:" fruits.("," 1 +2) ,
- > "nuts:" nuts.("," 1 +2)
- >
- >This would retain a certain amount of symmetry with the existing parsing elements
- >which is, to my mind, a good thing. And at the same time not collide with
- >the normal parsing stuff. OOOOh it also means we can dump the proposed STEM
- >keyword! Even cleaner yet!
- >
- > Parse Var stream "stream_positioner" n stem.(stem template) +n
- > ^^^^^^^^^^^^^^^^^^^^^ ^^
- > (regular parsing stuff)
- >
- > Parse Var stream "stream_positioner" n stem.(stem template) +n
- > ^^^^^^^^^^^^^^^^^^^^
- > (new parsing stuff)
- >What do you think? More workable? How tough is this syntax to interpret?
-
- I think this is getting awfully complex (I hear creatures feeping).
- Not as crufty as Lisp FORMAT yet, but getting close. One advantage
- of REXX is its readability - this strains it somewhat.
-
- I'd probably prefer to do it in multiple stages:
-
- Parse Var stream "fruit:" fruitlist "nuts:" nutlist
- Parse Var fruitlist Stem "," fruit.
- Parse Var nutlist Stem "," nut.
-
- Looks pretty clear to me that way.
-
- --
- Steve Bacher (Batchman) Draper Laboratory
- Internet: seb@draper.com Cambridge, MA, USA
-