Class Text_Highlighter_Generator
Syntax highliter class generator class
This class is used to generate PHP classes from XML files with highlighting rules
Usage example
require_once 'Text/Highlighter/Generator.php'; $generator =& new Text_Highlighter_Generator('php.xml'); $generator->generate(); $generator->saveCode('PHP.php');
A command line script generate is provided for class generation (installs in scripts/Text/Highlighter).
- XML_Parser
- Text_Highlighter_Generator
Copyright: 2004-2006 Andrey Demenev
License: PHP License
Author: Andrey Demenev <demenev@gmail.com>
Version: Release: 0.7.1
Link: http://pear.php.net/package/Text_Highlighter
Located at x2engine/framework/vendors/TextHighlighter/Text/Highlighter/Generator.php
public
|
|
public
array
|
#
_formatError( integer $code, string $params, string $fileName, integer $lineNo )
Format error message |
public
|
|
public
boolean
|
|
public
|
|
public
string
|
|
public
boolean
|
#
saveCode( string $filename )
Saves generated class to file. Note that |
public
boolean
|
|
public
array
|
|
public
|
|
public
integer
|
|
public
string
|
|
public
string
|
|
public
integer
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
#
xmltag_PartGroup( resource $xp, string $elem, array $attribs )
start handler for <partgroup> element |
public
|
#
xmltag_PartClass( resource $xp, string $elem, array $attribs )
start handler for <partclass> element |
public
|
#
xmltag_Keywords( resource $xp, string $elem, array $attribs )
start handler for <keywords> element |
public
|
|
public
|
#
xmltag_Contains( resource $xp, string $elem, array $attribs )
start handler for <contains> element |
public
|
|
public
|
|
public
|
|
public
|
#
xmltag_Highlight( resource $xp, string $elem, array $attribs )
start handler for <highlight> element |
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
public
boolean
|
$folding | false |
#
Whether to do case folding. We have to declare it here, because XML_Parser sets case folding in constructor |
public
string
|
$_syntaxFile |
|
#
Holds name of file with highlighting rules |
public
array
|
$_element |
|
#
Current element being processed |
public
array
|
$_regions | array() |
#
List of regions |
public
array
|
$_blocks | array() |
#
List of blocks |
public
array
|
$_keywords | array() |
#
List of keyword groups |
public
array
|
$_authors | array() |
#
List of authors |
public
string
|
$language | '' |
#
Name of language |
public
string
|
$_code | '' |
#
Generated code |
public
string
|
$_defClass | 'default' |
#
Default class |
public
string
|
$_comment | '' |
#
Comment |
public
boolean
|
$_inComment | false |
#
Flag for comment processing |
public
integer
|
$_blockOrder | 0 |
#
Sorting order of current block/region |
public
array
|
$_errors |
|
#
Generation errors |