I was hoping to write my own syntax highlighter for a summer project I am thinking of working on but I am not sure how to write my own syntax highlighter.
In StackOverflow podcast number 50 Steve Yegge talks a little about his project for creating some general highlight mechanism. Not a finished product and maybe more sophisticated than you are looking for, but there could be something of interest.