My background is as a self taught web developer. I am used to the request/response cycle. However, I'm getting more involved in event driven programming (JavaScript, native apps, etc). I had the idea that I wanted to write a native text editor with syntax highlighting (as a learning experience), and I realized I was stumped as to how to implement syntax highlighting. I am used to using a stock syntax highlighting library where you give the library some text an HTML version with syntax highlighting is returned. This is not how a normal text editor/IDE works. As you type, the characters are highlighted accordingly as the editor realizes what you are trying to type. So, from a high level overview, how would one implement syntax highlighting.
Asked
Active
Viewed 1,219 times
1
-
This is a pretty popular syntax highlighting lib. You can review the code for some help. http://code.google.com/p/google-code-prettify/ – box86rowh May 31 '12 at 00:24
-
Are you familiar with lexing, parsing, and so forth? – sarnold May 31 '12 at 00:31