I think it could be useful to rewrite some of the bbcode functions in /include/parser.php. Now, I'm not clamoring to see these changes right away but I think they would be helpful in the future.
Here's what I'm thinking:
(1) Move much of what preparse_bbcode() is doing into do_bbcode() or into some other function. (Look at dropping preparse_bbcode() altogether?tricked out RegExps can take up the slack and process the text with less preg_replace() calls.)
(2) Rearrange things so that there's only one copy of the bbcode patterns (lets say, in a new bbcode_patterns() function).
(3) Now, do_bbcode() can get its pattern arrays by calling bbcode_patterns().
So what's the point?:
These changes will help PunBB better cooperate with preview and WYSIWYG editor mods. PunBB will act the same as before, but future mods will have easy access to a master bbcode pattern list. A JavaScript editor mod could start sharing code with PunBB's standard editor.
I think this will be useful in the future because, as web apps mature, WYSIWYG editors are going to be the norm. People are going to expect them and anything less will be seen as old and unfriendly.
Later when a mature JavaScript WYSIWYG mod emerges, it could be offered as a convenient plug-in or even wrapped into the PunBB core.
In the case of JavaScript plug-ins: There are differences between PHP's and JavaScript's RegExp patterns but they could be converted by the mod.