On Sat, 27 Jul 2013 11:51:19 -0400, John Gilmore wrote:

>...  The
>problem here is, I think, one of concordance or coherence.  Anyone who
>knows something of a statement-level language should be able to make
>plausible, almost invariably confirmed conjectures about how the rest
>of it goes; and mixing syntactic sugars defeats this.
>
>The syntax of ALL non-assignment PL/I and REXX statements, CICS
>commands, and some but not all IBM utilities is the same simple, well
>understood one.  Lexical breakout is thus the same for any and all
>such statements, and token parsing can be table-driven.  In a REXX
>environment it is better and much easier to stick to it.
>
Of course there are two orthogonal scales of value that can be
applied here:

o Make the product comfortable to those accustomed to Perl.

o Make the product comfortable to those accustomed to MVS.

Yet I wonder.  I don't know Perl.  But I find "sed" regular expressions
are hellishly hard to read, still I'm hard-put to imagine an alternative
which would be significantly easier but not enormously tedious, in the
tradition of COBOL ("ADD A TO B GIVING C").

An example as a challenge.  This pointless "sed" regex replaces the
third word of each line with "wombat", indents the line 4 spaces,
and leaves the number of spaces elsewhere in the line unchanged:

    sed 's/^\( *[^ ]\+ \+[^ ]\+ \+\)[^ ]\+/    \1wombat/'

(Ouch!)  On z/OS, applied to a paragraph appearing above, it produces:

    >The syntax wombat ALL non-assignment PL/I and REXX statements, CICS
    >commands, and wombat but not all IBM utilities is the same simple, well
    >understood one.  wombat breakout is thus the same for any and all
    >such statements, wombat token parsing can be table-driven.  In a REXX
    >environment it wombat better and much easier to stick to it.

How might one imagine it sweetened with the syntactic sugar of MVS
but still acceptably concise?  Candidate schematic solutions welcome.

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to