rc-list - mailing list for the rc(1) shell
 help / color / mirror / Atom feed
From: John Mackin <john@syd.dit.csiro.au>
To: The rc Mailing List <rc@archone.tamu.edu>
Subject: Severe egg on face
Date: Sat, 24 Aug 1991 10:10:33 -0500	[thread overview]
Message-ID: <9108250110.16085.rc.bafup@syd.dit.csiro.au> (raw)
In-Reply-To: <9108241348.26582.rc.bafub@syd.dit.csiro.au>

_This_ time, I wrote:

    - if it does, then the function name terminates at the first "'" character
      following the "'" character in "fn '" which is not preceded by a "'"
      (wow, thank Duff for rc's simple, consistent quoting rules!)

Heavy sighing is about all I can manage at this stage.  Of course,
this breaks in the simple degenerate case of a function named '.

I'm now pretty certain (although having been this stupid, I don't
feel too certain about anything :() that this can't be done with
grep-style regular expressions, and therefore can't be done with sed.
If anyone is interested in following that up, do let me know if
you succeed: the problem is that when you match a ', it's not a terminator
if it was preceded by [^']', but is one if it was preceded by ''
or [^'], and I don't think it's possible to express that in a grep RE.
I _believe_ it can be done with an egrep RE, and therefore the
task can be accomplished with awk -- but I am by no means
prepared to assert that definitely.  (Being wrong does terrible
things to my self-confidence.)

As a sop, I'm prepared to offer the thought that all this doesn't
matter that much, since the purpose of getting rid of functions
with -p is to prevent people `surprising' your script, and for
that purpose, functions with quoted names aren't going to matter
and could be ignored (and left in the environment).  This is
by no means _right_, though.  If it can't be done with awk,
the solution is to code it up in C...

OK,
John.


      reply	other threads:[~1991-08-24 15:26 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-08-23 20:47 early reaction(s) to rc Arnold D. Robbins
1991-08-24  0:15 ` John Mackin
1991-08-24  3:48   ` John Mackin
1991-08-24 15:10     ` John Mackin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9108250110.16085.rc.bafup@syd.dit.csiro.au \
    --to=john@syd.dit.csiro.au \
    --cc=rc@archone.tamu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).