Python and Regular Expressions

Paul Rubin no.email at nospam.invalid
Sat Apr 10 21:38:28 EDT 2010


Steven D'Aprano <steve at REMOVE-THIS-cybersource.com.au> writes:
> As entertaining as this is, the analogy is rubbish. Skis are far too 
> simple to use as an analogy for a parser (he says, having never seen skis 
> up close in his life *wink*). Have you looked at PyParsing's source code? 
> Regexes are only a small part of the parser, and not analogous to the 
> wood of skis.

The impression that I have (from a distance) is that Pyparsing is a good
interface abstraction with a kludgy and slow implementation.  That the
implementation uses regexps just goes to show how kludgy it is.  One
hopes that someday there will be a more serious implementation, perhaps
using llvm-py (I wonder whatever happened to that project, by the way)
so that your parser script will compile to executable machine code on
the fly.



More information about the Python-list mailing list