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:

    It is true that this man was nothing but an elemental force in motion, directed and rendered more effective by extreme cunning and by a relentless tactical clairvoyance .... Hitler was history in its purest form.
    Albert Camus (1913–1960)

    Much of what contrives to create critical moments in parenting stems from a fundamental misunderstanding as to what the child is capable of at any given age. If a parent misjudges a child’s limitations as well as his own abilities, the potential exists for unreasonable expectations, frustration, disappointment and an unrealistic belief that what the child really needs is to be punished.
    Lawrence Balter (20th century)