Text_Highlighter
[ class tree: Text_Highlighter ] [ index: Text_Highlighter ] [ all elements ]
Prev Next

Creating a syntax highlighter

A brief tutorial

Introduction

Text_Highlighter is a class for syntax highlighting. The main idea is to simplify creation of subclasses implementing syntax highlighting for particular language. Subclasses do not implement any new functioanality, they just provide syntax highlighting rules. The rules sources are in XML format. To create a highlighter for a language, there is no need to code a new class manually. Simply describe the rules in XML file and use Text_Highlighter_Generator to create a new class.

To see a demonstration of the highlighter output, read the next section of this tutorial. Highlighting of XML code is done using Text_Highlighter_XML.

Prev   Next

Documentation generated on Mon, 11 Mar 2019 13:51:46 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.