start of bbcode parser