From: "Magnus Manske" <Magnus.Manske(a)epost.de>
The parser has to be brought up to speed. I'll also have a look into
connecting the PHP script with the C++ parser I wrote (did I mention 0.05
secs for rendering "Signal transduction", with fetching it from the
database, searching the database for existing topics, and adding the
"framework"?;)
As I said I'd rather keep it in PHP, but it's your project of course. Does
your parser put any requirements on the syntax. Should it be LL(1) or
LALR(1)? Are you going to use yacc, or is it just a simple recursiev descent
parser?
What we could improve in PHP for example is that the current parser parses
the string paragraph by paragraph. (But please don't use the function
explode() for that because that is a memory killer.) Most replace-functions
could be limited to only one paragraph and the rest can be dealt with by
making the parser a little context-sensitive. Standard Wiki matrup is
supposed to be limited to one paragraph anyway. The HTML markup is a bit
harder, but there you can remember the nesting depth and type of nesting,
and once you see that that tags are not balanced you go back in the string
and replace the < and > with entities. This will be expensive but it is an
exception, so it won't hurt.
-- Jan Hidders