Lexical analysis is one of the most important phases of a decent parser/compiler pipeline.
Implementing one with flex for parsing commands could be a good exercise. It would also be more efficient then the chained strcmps currently being done.
If you find flex fairly undocumented (which it is) you could also use re2c or ragel. I've personally never used ragel but have heard good things about it.
Lexical analysis is one of the most important phases of a decent parser/compiler pipeline.
Implementing one with
flex
for parsing commands could be a good exercise. It would also be more efficient then the chainedstrcmp
s currently being done.