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?

Reply via email to