9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Recursive structural expressions?
@ 2009-08-20 17:52 J.R. Mauro
  2009-08-20 19:53 ` erik quanstrom
  2009-08-21 14:24 ` Russ Cox
  0 siblings, 2 replies; 15+ messages in thread
From: J.R. Mauro @ 2009-08-20 17:52 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Has anyone given thought to recursive structural regular expressions?
I didn't see a way to do recursion from reading the paper and
experimenting.

The reason for recursion would be that instead of having hopped-up
regexes, we'd now have context-free expressions. Yacc needing tokens
makes doing CF things a pain, but I think if grep, sed, sam, etc
understood a simple CF expression language, we'd have something that
was (mathematically) more powerful.

One (perhaps silly) example is that you could see if your source code
had balanced parens/braces/brackets/tags in a jiffy, but other
examples include searching through records with complex structure.

I suppose it would likely be too slow, but would it cost anything when
it's not used?



^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2009-08-23 21:27 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-20 17:52 [9fans] Recursive structural expressions? 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
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

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).