Been playing around with Flex(http://flex.sourceforge.net/ ). It’s a Tokenizer (Lexical Analysis, http://en.wikipedia.org/wiki/Lexical_analysis ), ie, it splits strings into tokens to interpret them. You add a configuration file and get c-code (the „scanner“ – parser would be, at least looking at theoretical computer science), too much.
Closely related and often used in conjunction is Bison.exe (http://www.gnu.org/software/bison/manual/bison.html), a parser generator. It creates parsers from grammars and hurts my brain, a bit.
Well, in 90% of cases, I’m happy with a simple tokenizer. I use the class by vsczc in this stackoverflow thread: http://stackoverflow.com/questions/53849/how-do-i-tokenize-a-string-in-c
but it’s lacking one method, which is easy to figure out. 😉 (well, I like the code. It’s simple, easy to read and works for me.)
const std::string Tokenizer::GetToken() const