Improving std.regex(p)

Ben Hanson Ben.Hanson at tfbplc.co.uk
Tue Jun 22 04:36:03 PDT 2010


== Quote from div0 (div0 at users.sourceforge.net)'s article
> On 19/06/2010 20:39, Ben Hanson wrote:
> >  From memory (Joel did a PDF recently, but that is on my works machine) Joel has
> > been developing Spirit for over ten years. The latest version is pretty
> > sophisticated and has all kinds of clever stuff for directly parsing data in
> > structures all inline etc. Needless to say, I find the whole thing pretty mind
> > boggling. The biggest problem (as far as I can see as an observer) is the
> > compile times. This is where D could be really interesting overall (Hartmut has
> > certainly got his eye on it and in fact I'm sure all the Boost people do).
> I ported most of the classic version of spirit to d a while back.
> I've recently written a XML parser using it and it takes nearly 7 whole
> seconds to compile with DMD, which is a vast amount of time compared to
> rest of the stuff I compile. :)
> The most trivial spirit parser in c++ takes over 30 seconds on my
> machine, even with everything in the pre compiled header. D is just a
> massive win for productively.

Faster compile time code generation is a massive advantage for D.

Hartmut contacted me about a runtime LALR parser generator called Sweet Parser
(http://www.sweetsoftware.co.nz/parser_overview.php). They've contacted the author
about integrating a version of that into Spirit. A version in D that could run at
compile time would be cool too...

Bizzare timing or what!

It looks like interesting times lie ahead...

Regards,

Ben


More information about the Digitalmars-d mailing list