Location: PHPKode > projects > Content*Builder > cb_pear/Text/Highlighter/MYSQL.php
<?php
/**
 * Auto-generated class. MYSQL syntax highlighting
 * @package Text_Highlighter
 *
 * @author Andrey Demenev <hide@address.com>
 */

/**
 * @ignore
 */

require_once 'Text/Highlighter.php';

/**
 * Auto-generated class. MYSQL syntax highlighting
 * @package Text_Highlighter
 *
 * @author Andrey Demenev <hide@address.com>
 */
class  Text_Highlighter_MYSQL extends Text_Highlighter
{    /**
     * PHP4 Compatible Constructor
     *
     * @param array  $options
     * @access public
     */
    function Text_Highlighter_MYSQL($options=array())
    {
        $this->__construct($options);
    }


    /**
     *  Constructor
     *
     * @param array  $options
     * @access public
     */
    function __construct($options=array())
    {
        $this->_syntax = array (
            'regions' => 
            array (
                'qidentifier' => 
                array (
                    'name' => 'qidentifier',
                    'case' => false,
                    'innerColor' => 'identifier',
                    'delimColor' => 'quotes',
                    'start' => '/`/i',
                    'end' => '/`/i',
                    'remember' => false,
                ),
                'mlcomment' => 
                array (
                    'name' => 'mlcomment',
                    'case' => false,
                    'innerColor' => 'comment',
                    'delimColor' => 'comment',
                    'start' => '/\\/\\*/i',
                    'end' => '/\\*\\//i',
                    'remember' => false,
                ),
                'strdouble' => 
                array (
                    'name' => 'strdouble',
                    'case' => false,
                    'innerColor' => 'string',
                    'delimColor' => 'quotes',
                    'start' => '/"/i',
                    'end' => '/"/i',
                    'remember' => false,
                    'lookfor' => 
                    array (
                        'blocks' => 
                        array (
                            0 => 'escaped',
                        ),
                    ),
                ),
                'brackets' => 
                array (
                    'name' => 'brackets',
                    'case' => false,
                    'innerColor' => 'code',
                    'delimColor' => 'brackets',
                    'start' => '/\\(/i',
                    'end' => '/\\)/i',
                    'remember' => false,
                    'lookfor' => 
                    array (
                        'regions' => 
                        array (
                            0 => 'qidentifier',
                            1 => 'mlcomment',
                            2 => 'strdouble',
                            3 => 'brackets',
                            4 => 'strsingle',
                        ),
                        'blocks' => 
                        array (
                            0 => 'comment',
                            1 => 'possiblefunction',
                            2 => 'identifier',
                            3 => 'exponent',
                            4 => 'float',
                            5 => 'integer',
                            6 => 'hexinteger',
                        ),
                    ),
                ),
                'strsingle' => 
                array (
                    'name' => 'strsingle',
                    'case' => false,
                    'innerColor' => 'string',
                    'delimColor' => 'quotes',
                    'start' => '/\'/i',
                    'end' => '/\'/i',
                    'remember' => false,
                    'lookfor' => 
                    array (
                        'blocks' => 
                        array (
                            0 => 'escaped',
                        ),
                    ),
                ),
            ),
            'keywords' => 
            array (
                'reserved' => 
                array (
                    'name' => 'reserved',
                    'innerColor' => 'reserved',
                    'case' => false,
                    'inherits' => 'identifier',
                    'match' => 
                    array (
                        'action' => true,
                        'add' => true,
                        'aggregate' => true,
                        'all' => true,
                        'alter' => true,
                        'after' => true,
                        'and' => true,
                        'as' => true,
                        'asc' => true,
                        'avg' => true,
                        'avg_row_length' => true,
                        'auto_increment' => true,
                        'between' => true,
                        'bigint' => true,
                        'bit' => true,
                        'binary' => true,
                        'blob' => true,
                        'bool' => true,
                        'both' => true,
                        'by' => true,
                        'cascade' => true,
                        'case' => true,
                        'char' => true,
                        'character' => true,
                        'change' => true,
                        'check' => true,
                        'checksum' => true,
                        'column' => true,
                        'columns' => true,
                        'comment' => true,
                        'constraint' => true,
                        'create' => true,
                        'cross' => true,
                        'current_date' => true,
                        'current_time' => true,
                        'current_timestamp' => true,
                        'data' => true,
                        'database' => true,
                        'databases' => true,
                        'date' => true,
                        'datetime' => true,
                        'day' => true,
                        'day_hour' => true,
                        'day_minute' => true,
                        'day_second' => true,
                        'dayofmonth' => true,
                        'dayofweek' => true,
                        'dayofyear' => true,
                        'dec' => true,
                        'decimal' => true,
                        'default' => true,
                        'delayed' => true,
                        'delay_key_write' => true,
                        'delete' => true,
                        'desc' => true,
                        'describe' => true,
                        'distinct' => true,
                        'distinctrow' => true,
                        'double' => true,
                        'drop' => true,
                        'end' => true,
                        'else' => true,
                        'escape' => true,
                        'escaped' => true,
                        'enclosed' => true,
                        'enum' => true,
                        'explain' => true,
                        'exists' => true,
                        'fields' => true,
                        'file' => true,
                        'first' => true,
                        'float' => true,
                        'float4' => true,
                        'float8' => true,
                        'flush' => true,
                        'foreign' => true,
                        'from' => true,
                        'for' => true,
                        'full' => true,
                        'function' => true,
                        'global' => true,
                        'grant' => true,
                        'grants' => true,
                        'group' => true,
                        'having' => true,
                        'heap' => true,
                        'high_priority' => true,
                        'hour' => true,
                        'hour_minute' => true,
                        'hour_second' => true,
                        'hosts' => true,
                        'identified' => true,
                        'ignore' => true,
                        'in' => true,
                        'index' => true,
                        'infile' => true,
                        'inner' => true,
                        'insert' => true,
                        'insert_id' => true,
                        'int' => true,
                        'integer' => true,
                        'interval' => true,
                        'int1' => true,
                        'int2' => true,
                        'int3' => true,
                        'int4' => true,
                        'int8' => true,
                        'into' => true,
                        'if' => true,
                        'is' => true,
                        'isam' => true,
                        'join' => true,
                        'key' => true,
                        'keys' => true,
                        'kill' => true,
                        'last_insert_id' => true,
                        'leading' => true,
                        'left' => true,
                        'length' => true,
                        'like' => true,
                        'lines' => true,
                        'limit' => true,
                        'load' => true,
                        'local' => true,
                        'lock' => true,
                        'logs' => true,
                        'long' => true,
                        'longblob' => true,
                        'longtext' => true,
                        'low_priority' => true,
                        'max' => true,
                        'max_rows' => true,
                        'match' => true,
                        'mediumblob' => true,
                        'mediumtext' => true,
                        'mediumint' => true,
                        'middleint' => true,
                        'min_rows' => true,
                        'minute' => true,
                        'minute_second' => true,
                        'modify' => true,
                        'month' => true,
                        'monthname' => true,
                        'myisam' => true,
                        'natural' => true,
                        'numeric' => true,
                        'no' => true,
                        'not' => true,
                        'null' => true,
                        'on' => true,
                        'optimize' => true,
                        'option' => true,
                        'optionally' => true,
                        'or' => true,
                        'order' => true,
                        'outer' => true,
                        'outfile' => true,
                        'pack_keys' => true,
                        'partial' => true,
                        'password' => true,
                        'precision' => true,
                        'primary' => true,
                        'procedure' => true,
                        'process' => true,
                        'processlist' => true,
                        'privileges' => true,
                        'read' => true,
                        'real' => true,
                        'references' => true,
                        'reload' => true,
                        'regexp' => true,
                        'rename' => true,
                        'replace' => true,
                        'restrict' => true,
                        'returns' => true,
                        'revoke' => true,
                        'rlike' => true,
                        'row' => true,
                        'rows' => true,
                        'second' => true,
                        'select' => true,
                        'set' => true,
                        'show' => true,
                        'shutdown' => true,
                        'smallint' => true,
                        'soname' => true,
                        'sql_big_tables' => true,
                        'sql_big_selects' => true,
                        'sql_low_priority_updates' => true,
                        'sql_log_off' => true,
                        'sql_log_update' => true,
                        'sql_select_limit' => true,
                        'sql_small_result' => true,
                        'sql_big_result' => true,
                        'sql_warnings' => true,
                        'straight_join' => true,
                        'starting' => true,
                        'status' => true,
                        'string' => true,
                        'table' => true,
                        'tables' => true,
                        'temporary' => true,
                        'terminated' => true,
                        'text' => true,
                        'then' => true,
                        'time' => true,
                        'timestamp' => true,
                        'tinyblob' => true,
                        'tinytext' => true,
                        'tinyint' => true,
                        'trailing' => true,
                        'to' => true,
                        'type' => true,
                        'use' => true,
                        'using' => true,
                        'unique' => true,
                        'unlock' => true,
                        'unsigned' => true,
                        'update' => true,
                        'usage' => true,
                        'values' => true,
                        'varchar' => true,
                        'variables' => true,
                        'varying' => true,
                        'varbinary' => true,
                        'with' => true,
                        'write' => true,
                        'when' => true,
                        'where' => true,
                        'year' => true,
                        'year_month' => true,
                        'zerofill' => true,
                    ),
                ),
                'function' => 
                array (
                    'name' => 'function',
                    'innerColor' => 'reserved',
                    'case' => false,
                    'inherits' => 'possiblefunction',
                    'otherwise' => 'identifier',
                    'match' => 
                    array (
                        'abs' => true,
                        'acos' => true,
                        'adddate' => true,
                        'ascii' => true,
                        'asin' => true,
                        'atan' => true,
                        'atan2' => true,
                        'avg' => true,
                        'benchmark' => true,
                        'bin' => true,
                        'ceiling' => true,
                        'char' => true,
                        'coalesce' => true,
                        'concat' => true,
                        'conv' => true,
                        'cos' => true,
                        'cot' => true,
                        'count' => true,
                        'curdate' => true,
                        'curtime' => true,
                        'database' => true,
                        'dayname' => true,
                        'dayofmonth' => true,
                        'dayofweek' => true,
                        'dayofyear' => true,
                        'decode' => true,
                        'degrees' => true,
                        'elt' => true,
                        'encode' => true,
                        'encrypt' => true,
                        'exp' => true,
                        'extract' => true,
                        'field' => true,
                        'floor' => true,
                        'format' => true,
                        'greatest' => true,
                        'hex' => true,
                        'hour' => true,
                        'if' => true,
                        'ifnull' => true,
                        'insert' => true,
                        'instr' => true,
                        'interval' => true,
                        'isnull' => true,
                        'lcase' => true,
                        'least' => true,
                        'left' => true,
                        'length' => true,
                        'locate' => true,
                        'log' => true,
                        'log10' => true,
                        'lower' => true,
                        'lpad' => true,
                        'ltrim' => true,
                        'max' => true,
                        'md5' => true,
                        'mid' => true,
                        'min' => true,
                        'minute' => true,
                        'mod' => true,
                        'month' => true,
                        'monthname' => true,
                        'now' => true,
                        'nullif' => true,
                        'oct' => true,
                        'ord' => true,
                        'password' => true,
                        'pi' => true,
                        'position' => true,
                        'pow' => true,
                        'power' => true,
                        'prepare' => true,
                        'quarter' => true,
                        'radians' => true,
                        'rand' => true,
                        'repeat' => true,
                        'replace' => true,
                        'reverse' => true,
                        'right' => true,
                        'round' => true,
                        'rpad' => true,
                        'rtrim' => true,
                        'second' => true,
                        'sign' => true,
                        'sin' => true,
                        'soundex' => true,
                        'space' => true,
                        'sqrt' => true,
                        'std' => true,
                        'stddev' => true,
                        'strcmp' => true,
                        'subdate' => true,
                        'substring' => true,
                        'sum' => true,
                        'sysdate' => true,
                        'tan' => true,
                        'trim' => true,
                        'truncate' => true,
                        'ucase' => true,
                        'upper' => true,
                        'user' => true,
                        'version' => true,
                        'week' => true,
                        'weekday' => true,
                        'year' => true,
                    ),
                ),
            ),
            'blocks' => 
            array (
                'comment' => 
                array (
                    'name' => 'comment',
                    'case' => false,
                    'innerColor' => 'comment',
                    'match' => '/(#|--\\s).*/i',
                    'multiline' => false,
                ),
                'possiblefunction' => 
                array (
                    'name' => 'possiblefunction',
                    'case' => false,
                    'innerColor' => 'identifier',
                    'match' => '/[a-z_]\\w*(?=\\()/i',
                    'multiline' => false,
                ),
                'identifier' => 
                array (
                    'name' => 'identifier',
                    'case' => false,
                    'innerColor' => 'identifier',
                    'match' => '/[a-z_]\\w*/i',
                    'multiline' => false,
                ),
                'escaped' => 
                array (
                    'name' => 'escaped',
                    'case' => false,
                    'innerColor' => 'special',
                    'match' => '/\\\\./i',
                    'multiline' => false,
                ),
                'exponent' => 
                array (
                    'name' => 'exponent',
                    'case' => false,
                    'innerColor' => 'number',
                    'match' => '/((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+)/i',
                    'multiline' => false,
                ),
                'float' => 
                array (
                    'name' => 'float',
                    'case' => false,
                    'innerColor' => 'number',
                    'match' => '/(\\d*\\.\\d+)|(\\d+\\.\\d*)/i',
                    'multiline' => false,
                ),
                'integer' => 
                array (
                    'name' => 'integer',
                    'case' => false,
                    'innerColor' => 'number',
                    'match' => '/\\d+l?|\\b0l?\\b/i',
                    'multiline' => false,
                ),
                'hexinteger' => 
                array (
                    'name' => 'hexinteger',
                    'case' => false,
                    'innerColor' => 'number',
                    'match' => '/0[xX][\\da-f]+l?/i',
                    'multiline' => false,
                ),
            ),
            'toplevel' => 
            array (
                'blocks' => 
                array (
                    0 => 'comment',
                    1 => 'possiblefunction',
                    2 => 'identifier',
                    3 => 'exponent',
                    4 => 'float',
                    5 => 'integer',
                    6 => 'hexinteger',
                ),
                'regions' => 
                array (
                    0 => 'qidentifier',
                    1 => 'mlcomment',
                    2 => 'strdouble',
                    3 => 'brackets',
                    4 => 'strsingle',
                ),
            ),
            'case' => false,
            'defcolor' => 'code',
        );

        parent::_init($options);
    }
}

?>
Return current item: Content*Builder