Syntax Highlighting - History and Limitations

History and Limitations

The ideas of syntax highlighting overlap significantly with those of syntax-directed editors. One of the first such editor for code was Wilfred Hansen's 1969 code editor Emily. It provided advanced language-independent code completion facilities, and unlike modern editors with syntax highlighting, actually made it impossible to create syntactically incorrect programs.

Other editors followed, for example, on microcomputers, MacPascal 1.0 (October 10, 1985) recognized Pascal syntax as it was typed and used font changes (e.g., bold for keywords) to highlight syntax and automatically indented code to match its structure.

The Live Parsing Editor (LEXX) was written for the VM operating system for the computerization of the Oxford English Dictionary in 1985 and was one of the first to use color syntax highlighting. Its live parsing capability allowed user-supplied parsers to be added to the editor, for text, programs, data file, etc. See: LEXX – A programmable structured editor, Cowlishaw, M. F., IBM Journal of Research and Development, Vol 31, No. 1, 1987, IBM Reprint order number G322-0151

Since most text editors highlight syntax based on complex pattern matching heuristics rather than actually implementing a parser for each possible language, which could be prohibitively complex, the highlighting is almost never completely accurate. Moreover, depending on the pattern matching algorithms, the highlighting engine can become very slow for certain types of language structures. Some editors overcome this problem by not always parsing the whole file but rather just the visible area, sometimes scanning backwards in the text up to a limited number of lines for "syncing".

However, modern language-specific IDEs (in contrast to text editors) generally perform actual language parsing so they can be completely accurate.

See the Programming features section of the Comparison of text editors article for a list of some editors that have syntax highlighting.

Read more about this topic:  Syntax Highlighting

Famous quotes containing the words history and/or limitations:

    I assure you that in our next class we will concern ourselves solely with the history of Egypt, and not with the more lurid and non-curricular subject of living mummies.
    Griffin Jay, and Reginald LeBorg. Prof. Norman (Frank Reicher)

    The motion picture made in Hollywood, if it is to create art at all, must do so within such strangling limitations of subject and treatment that it is a blind wonder it ever achieves any distinction beyond the purely mechanical slickness of a glass and chromium bathroom.
    Raymond Chandler (1888–1959)