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.
I know tha
A good start to one approach for this is the Udacity course CS262. The title is building a web browser, but really the class focuses on exactly the problems you are looking for - how to parse and lex a set of text. In your case, you'd use that info for highlighting. I just took it and it was very good. The course is "over" now, but the videos and practice problems/homeworks are still up and available for viewing.