I have made a small start on creating some of the infrastructure for
implementing a new API for PCRE, as discussed on this list for some
time. I soon realized that the idea of having just a single "context"
does not work. In the proposal as it was, some of the fields in the
context applied at compile time, some at match time, and others at other
times. It was possible (for example) to change compile-time fields after
a pattern had been compiled, but it was not clear that this would have
no effect. This seemed to me to be very confusing.
I have had a re-think. There is now a revised proposal here:
ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/Testing/PCRE2_proposal.pdf
There are many changes. There are now three "contexts", *but simple
applications do not need to use any of them*. The fields in the contexts
are all, in some sense, "advanced" features of the API, and many
programs will just be able to pass NULL and ignore contexts altogether.
I have also renamed a lot of the functions in an attempt to get a more
consistent naming scheme.
There is now a Subversion repository for developing the new API here:
svn://vcs.exim.org/pcre2/code/trunk
What is there at the moment is some framework, a lot of dummy functions,
and the code for a re-implemented test program (now called pcre2test)
that I am working on. There is nothing usable, but you are welcome to
look at it to see how I am setting it up.
I *hope* there are no more major changes of style for the new API,
though I have no doubt that there are sure to be changes of detail.
Philip
--
Philip Hazel