Recursive regexps?

Jeremy Bowers jerf at jerf.org
Sat Nov 20 00:37:42 EST 2004


On Fri, 19 Nov 2004 15:39:02 -0800, James Stroud wrote:
> I dont have a CS degree, but I'm pretty sure that computers can do this sort 
> of thing. It must not be obvious. I'm thinking of patenting the idea (regex 
> engine returns nested matches) and copyrighting the name for it.

The only possible name is Recursive Descent Regular Expressions. 

(CS joke. There are three basic language domains, based on parser power
necessary to recognize it. "Regular Expressions" is the lowest, but the
actual 'regular expression' the math refers to is much, much weaker the re
library, which nowadays is technically on the top level I think since you
can shell out to functions in the middle of an RE operation. A "Recursive
descent parser" is a parser for a subset of the middle class of languages,
the "context-free languages". "Unrestricted grammars" are the top, parsed
by Turing Machines.

Of course, it would be even more accurate to call it "Recursive Descent
Regular Expressions with a side of Turing Completeness" to mix all three
levels, but that's not so catchy for a brand name. Ought to make the
patent office swoon, though.)




More information about the Python-list mailing list