I decided to write a small parser to parse BBCode and return properly formatted HTML. I am having a hard time deciding what the most efficient way to represent the keywords would be. I could always use separate strings to hold them, but I feel like there must be some unknown data structure (to me) that would allow for efficient lookup.
I am using C++ if there is anything in the STL I can use. I don't intend to actually use it so I don't need to use anything like PHP. It will not have a GUI interface; just input a text file and it outputs a new file with the HTML parsed out.
Edit: By keywords, I mean the opening and closing tags, such as [b]
and [/b]
.