Hello Anna,
the only real parser for the wikitext that MediaWiki uses is the MediaWiki parser itself. That one is really a twisted piece of software that you don't want to mess around, especially after its rewrite during the last release. There are numerous projects of people trying to come up with parsers for wikitext in all kinds of programming languages, the most promising one was some Python code by the OLPC foundation, but most of them are quite outdated and have been abandoned and none of them really support the full wikitext. I spent some days on this and I'd say that it's fruitless to try and find a parser that might enable one to really render into something else but the XHTML that the MediaWiki software generates. There might be a principal problem with grammatics here, too, but I didn't pick that compiler construction CS course to be able to tell. You might either try to render the resulting XHTML, but I don't think that this will be any easier, or use a limited subset for text markup and write your own parser.
What makes things easier, the latter has already been done by somebody: The
txt2tags software can convert text markup into a number of end formats, including (X)HTML, LaTeX, Man pages and even MediaWiki's wikitext (their web site has been done completely in txt2tags as well). And somebody even wrote a so-called "desktop wiki" software for it,
Wixi, which is a program that can be used like a Wiki locally. So this might be close to what you are looking for.
Cheers,
Karsten