On 4/24/06, Ivan Krstic <krstic(a)fas.harvard.edu>
wrote:
Pedro de Medeiros wrote:
As a matter of fact, I did. Sometime ago. But
code was difficult to
understand, it wouldn't compile and running bison on the .y file
returned lots (maybe 2000?) grammar conflicts.
The latter part of this is surprising. Timwi, can you clarify? I seem to
remember that the parser was incomplete, but what of it was there worked
fine.
If I am not mistaken, the name of the directory is flexbisonparse. CVS
tells me it is several months stopped. Code was probably confusing
because wiki syntax is not really context free, so there is a lot of
considerations to make beforehand.
I would also like to know from Timwi (or anyone who is involved with
it) what is planned for this parser in the future and how it will be
used.
That
depends also in what platform this parser need be, and also for
what use.
Not really. My point was that it's easy to build a parser for *a lot*
of
the MediaWiki syntax, and hard to build one for all of it. We need the
latter.
Ok. But what I said about writing the wiki parser is not besides the
point: I suppose a complete wiki parser is pretty much needed. If one
is to finish an incomplete parser or to rewrite a new one based on
that is a matter of approach. And I think the existing one needs some
heavy lifting and, from what I saw of it, it won't be an easy task to
complete it.
Timwi's work used standard tools that would
eventually produce a C
parser, IIRC. Of course none of the parsers in SVN are complete -- if
they were, we wouldn't be having this discussion.
Yes, I guess it is pretty much unmantained nowadays. Most of it is
more than 2 years old. I guess this serves as an indication that it
needs a heavy lifting. :)
After Timwi stopped working on it, I had a look but couldn't make enough
sense of the lexer to contribute anything useful.
The parser was actually quite developed at the time, with the notable
exception of HTML-style tags; anything between two matching ones was not
parsed at all. If someone could add that, it would be 90% complete
(rough estimate).
Magnus