Syntax hilighting is not quite so simple. There are special cases you have to account for, that make the code somewhat more complex. For example, if I make a comment that says:
Code:
// If the "if" statement's condition below is true, it should run the "auto-vivify-functifier"
I wouldn't expect 'if' to be highlighted another color, nor would I expect the text in quotation marks to be highlighted another color. Also, you have to watch out for "This string keeps on \" going \", even though I just had two quotation marks, I'm still not finished." There are many other conditions you have to watch out for, too. Sure, not all these cases might come up, ... and really, someone can just copy the coad into their favorite C editor anyway, ... but I'd look for an already done solution (why reinvent the wheel? unless, of course, this is for your edification, in which case you might want to think about more of the special cases yourself).
For an example of some conditions you didn't catch, look at the PID code. EDIT: especially, looking over it again, in the Trig lookup table, the "extra" highlighted parts of the comment can get annoying, and potentially mess someone up.