Here's a list of articles on related issues of:
computer languages syntax coloring, code formatting, extend selection, etc.
These are very useful features for programers, and it all has to do with a parser designed for editor purposes, very different in nature than the parser in a compiler of a programing language.