grammar Bristlecode rule root (tag / text)+ end rule text (!tag .)+ end rule tag (bold) end ############################## # bold ############################## rule bold bold_open ((!bold_close .)+ ) bold_close end rule bold_open '[b]' / '[B]' end rule bold_close '[/b]' / '[/B]' end end