Nick
nick at dd.revealed.net
Thu Feb 16 15:02:35 EST 2006
Nicolas Lehuen wrote: > If it were up to me, I would reimplement it in pure Python, and I > don't think the performance loss would be so big. Granted, compilation > would be a little slower, but once the PSP is compiled, performance > should be exactly the same - and implementing a compiler cache is > extremely easy. Plus, the code being more easy to maintain, we could > easily optimize it. Call it "doing it the PyPy way" if you like ;). The original PSE parser I did worked very similar to PSP. I used HTMLParser in the standard lib to do it. However, it was different in that it was not PHP/ASP-ish where code could just be stuck anywhere; it had to be parsable HTML. But I suspect you could just use a regular expression to do what the PSP parser does. Nick
|