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 that there are bunch of implementations out there but I would like to learn about regular expressions and how syntax highlighting works.
How does syntax highlighting work and what are some good references for developing one? Does the syntax highlighter scan each character as it is typed or does it scan the document/text area as a whole after each character is typed?
Any insight would be greatly appreciated.
Thanks.
PS: I was planning on writing it in ActionScript