Wikitext is not parseable. I've posted a bunch of notes here maybe 2 months ago highlighting how absurdly horrible it is. There is no spec but even if there was one it would be unimplementable. There is only one parser: the one that powers Wikipedia, it's a mixmash of cursed PHP that is not portable. I don't know how you can think that is compatible with anything.