- Well, it would be logical
madness if it actually rendered like that. For some reason the first apostrophe renders as neither bold nor italics. So it's illogical madness :)
It's logical madness. The parser does everything backwards for some reason - when it finds a long sequence of tokens, it starts at the end and works backwards finding the longest possible token, so when it sees 6 apostrophes it starts and the ends and works back, until it has 3, which is the most that is meaningful, and replaces them with <B>, then keeps going until is has 2 more (which is now the most that is meaningful, since <B><B> is redundant), and turns them into <I>, and then is left with just 1, which is meaningless, so leaves it as a literal apostrophe. It's completely mad, but it does make sense once you understand it. (Actually, I think it might be even more complicated than that - I think I heard someone say it actually looks for closing tags and then tries to find a corresponding opening tag, so it's doubly backwards. Although, the opening and closing tags for emphasis are the same, so it might just be [[]] and {{}} that are doubly backwards...)
So, I would imagine implementing a new parser that has the same behaviour as the current one will require enormous amounts of backtracking, simply because the current behaviour is defined in terms of working backwards.
(This is all assuming I'm understanding the current parser correctly, which is a big assumption.)