9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] Recursive structural expressions?
Date: Thu, 20 Aug 2009 16:39:32 -0400	[thread overview]
Message-ID: <52874b2e6f91cb50473a44e65c0d187a@quanstro.net> (raw)
In-Reply-To: <3aaafc130908201333t547ea182t980e6f3352fce40f@mail.gmail.com>

> > i'm sure i've done them.  this is a lame example, since i can't remember
> > where i've used these techniques off the top of my head
> >
> > ,x:.*: g/#pragma/ x:[^  ]+[     ]: g/print/p
>
> How is this recursive?

in the sense that 'x' is recursively applied to the output of 'x'.
i have no idea what you would mean by applying the same 'x'
expression to the output of said 'x' expression, as regular expressions
are greedy and can't count.  wouldn't they all loop forever?

can you outline somehow what you're thinking of?

- erik



  reply	other threads:[~2009-08-20 20:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-20 17:52 J.R. Mauro
2009-08-20 19:53 ` erik quanstrom
2009-08-20 20:33   ` J.R. Mauro
2009-08-20 20:39     ` erik quanstrom [this message]
2009-08-20 21:14       ` J.R. Mauro
2009-08-20 21:26         ` erik quanstrom
2009-08-21  0:21           ` J.R. Mauro
2009-08-21  1:01             ` erik quanstrom
2009-08-21  1:14               ` Charles Forsyth
2009-08-22  1:10                 ` J.R. Mauro
2009-08-23 19:59                   ` Aharon Robbins
2009-08-23 21:27                     ` Rob Pike
2009-08-21 13:58               ` J. R. Mauro
2009-08-21 14:24 ` Russ Cox
2009-08-21 14:57   ` J. R. Mauro

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=52874b2e6f91cb50473a44e65c0d187a@quanstro.net \
    --to=quanstro@quanstro.net \
    --cc=9fans@9fans.net \
    /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).