Вход Регистрация
Файл: framework/vendors/TextHighlighter/Text/Highlighter/CPP.php
Строк: 291
<?php
/**
 * Auto-generated class. CPP syntax highlighting
 * 
 * 
 * Thanks to Aaron Kalin for initial
 * implementation of this highlighter
 *      
 *
 * PHP version 4 and 5
 *
 * LICENSE: This source file is subject to version 3.0 of the PHP license
 * that is available through the world-wide-web at the following URI:
 * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
 * the PHP License and are unable to obtain it through the web, please
 * send a note to license@php.net so we can mail you a copy immediately.
 *
 * @copyright  2004-2006 Andrey Demenev
 * @license    http://www.php.net/license/3_0.txt  PHP License
 * @link       http://pear.php.net/package/Text_Highlighter
 * @category   Text
 * @package    Text_Highlighter
 * @version    generated from: : cpp.xml,v 1.1 2007/06/03 02:35:28 ssttoo Exp 
 * @author Aaron Kalin
 * @author Andrey Demenev <demenev@gmail.com>
 *
 */

/**
 * Auto-generated class. CPP syntax highlighting
 *
 * @author Aaron Kalin
 * @author Andrey Demenev <demenev@gmail.com>
 * @category   Text
 * @package    Text_Highlighter
 * @copyright  2004-2006 Andrey Demenev
 * @license    http://www.php.net/license/3_0.txt  PHP License
 * @version    Release: 0.7.1
 * @link       http://pear.php.net/package/Text_Highlighter
 */
class  Text_Highlighter_CPP extends Text_Highlighter
{
    var 
$_language 'cpp';

    
/**
     *  Constructor
     *
     * @param array  $options
     * @access public
     */
    
function __construct($options=array())
    {

        
$this->_options $options;
        
$this->_regs = array (
            -
=> '/((?i)")|((?i)\{)|((?i)\()|((?i)\[)|((?i)[a-z_]\w*)|((?i)\b0[xX][\da-f]+)|((?i)\b\d\d*|\b0\b)|((?i)\b0[0-7]+)|((?i)\b(\d*\.\d+)|(\d+\.\d*))|((?mi)^[ \t]*#include)|((?mii)^[ \t]*#[ \t]*[a-z]+)|((?i)\d*\.?\d+)|((?i)\/\*)|((?i)\/\/.+)/',
            
=> '/((?i)\\)/',
            
=> '/((?i)")|((?i)\{)|((?i)\()|((?i)\[)|((?i)[a-z_]\w*)|((?i)\b0[xX][\da-f]+)|((?i)\b\d\d*|\b0\b)|((?i)\b0[0-7]+)|((?i)\b(\d*\.\d+)|(\d+\.\d*))|((?mi)^[ \t]*#include)|((?mii)^[ \t]*#[ \t]*[a-z]+)|((?i)\d*\.?\d+)|((?i)\/\*)|((?i)\/\/.+)/',
            
=> '/((?i)")|((?i)\{)|((?i)\()|((?i)\[)|((?i)[a-z_]\w*)|((?i)\b0[xX][\da-f]+)|((?i)\b\d\d*|\b0\b)|((?i)\b0[0-7]+)|((?i)\b(\d*\.\d+)|(\d+\.\d*))|((?mi)^[ \t]*#include)|((?mii)^[ \t]*#[ \t]*[a-z]+)|((?i)\d*\.?\d+)|((?i)\/\*)|((?i)\/\/.+)/',
            
=> '/((?i)")|((?i)\{)|((?i)\()|((?i)\[)|((?i)[a-z_]\w*)|((?i)\b0[xX][\da-f]+)|((?i)\b\d\d*|\b0\b)|((?i)\b0[0-7]+)|((?i)\b(\d*\.\d+)|(\d+\.\d*))|((?mi)^[ \t]*#include)|((?mii)^[ \t]*#[ \t]*[a-z]+)|((?i)\d*\.?\d+)|((?i)\/\*)|((?i)\/\/.+)/',
            
=> '//',
            
=> '/((?i)")|((?i)<)/',
            
=> '/((?i)")|((?i)\{)|((?i)\()|((?i)[a-z_]\w*)|((?i)\b0[xX][\da-f]+)|((?i)\b\d\d*|\b0\b)|((?i)\b0[0-7]+)|((?i)\b(\d*\.\d+)|(\d+\.\d*))|((?i)\/\*)|((?i)\/\/.+)/',
            
=> '/((?i)\$\w+\s*:.+\$)/',
            
=> '/((?i)\$\w+\s*:.+\$)/',
        );
        
$this->_counts = array (
            -
=> 
            array (
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 2,
                
=> 0,
                
10 => 0,
                
11 => 0,
                
12 => 0,
                
13 => 0,
            ),
            
=> 
            array (
                
=> 0,
            ),
            
=> 
            array (
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 2,
                
=> 0,
                
10 => 0,
                
11 => 0,
                
12 => 0,
                
13 => 0,
            ),
            
=> 
            array (
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 2,
                
=> 0,
                
10 => 0,
                
11 => 0,
                
12 => 0,
                
13 => 0,
            ),
            
=> 
            array (
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 2,
                
=> 0,
                
10 => 0,
                
11 => 0,
                
12 => 0,
                
13 => 0,
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> 0,
                
=> 0,
            ),
            
=> 
            array (
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 0,
                
=> 2,
                
=> 0,
                
=> 0,
            ),
            
=> 
            array (
                
=> 0,
            ),
            
=> 
            array (
                
=> 0,
            ),
        );
        
$this->_delim = array (
            -
=> 
            array (
                
=> 'quotes',
                
=> 'brackets',
                
=> 'brackets',
                
=> 'brackets',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> 'prepro',
                
10 => 'prepro',
                
11 => '',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
                
=> '',
            ),
            
=> 
            array (
                
=> 'quotes',
                
=> 'brackets',
                
=> 'brackets',
                
=> 'brackets',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> 'prepro',
                
10 => 'prepro',
                
11 => '',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
                
=> 'quotes',
                
=> 'brackets',
                
=> 'brackets',
                
=> 'brackets',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> 'prepro',
                
10 => 'prepro',
                
11 => '',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
                
=> 'quotes',
                
=> 'brackets',
                
=> 'brackets',
                
=> 'brackets',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> 'prepro',
                
10 => 'prepro',
                
11 => '',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> 'quotes',
                
=> 'quotes',
            ),
            
=> 
            array (
                
=> 'quotes',
                
=> 'brackets',
                
=> 'brackets',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> '',
                
=> 'mlcomment',
                
=> 'comment',
            ),
            
=> 
            array (
                
=> '',
            ),
            
=> 
            array (
                
=> '',
            ),
        );
        
$this->_inner = array (
            -
=> 
            array (
                
=> 'string',
                
=> 'code',
                
=> 'code',
                
=> 'code',
                
=> 'identifier',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'prepro',
                
10 => 'code',
                
11 => 'number',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
                
=> 'special',
            ),
            
=> 
            array (
                
=> 'string',
                
=> 'code',
                
=> 'code',
                
=> 'code',
                
=> 'identifier',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'prepro',
                
10 => 'code',
                
11 => 'number',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
                
=> 'string',
                
=> 'code',
                
=> 'code',
                
=> 'code',
                
=> 'identifier',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'prepro',
                
10 => 'code',
                
11 => 'number',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
                
=> 'string',
                
=> 'code',
                
=> 'code',
                
=> 'code',
                
=> 'identifier',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'prepro',
                
10 => 'code',
                
11 => 'number',
                
12 => 'mlcomment',
                
13 => 'comment',
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> 'string',
                
=> 'string',
            ),
            
=> 
            array (
                
=> 'string',
                
=> 'code',
                
=> 'code',
                
=> 'identifier',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'number',
                
=> 'mlcomment',
                
=> 'comment',
            ),
            
=> 
            array (
                
=> 'inlinedoc',
            ),
            
=> 
            array (
                
=> 'inlinedoc',
            ),
        );
        
$this->_end = array (
            
=> '/(?i)"/',
            
=> '/(?i)\}/',
            
=> '/(?i)\)/',
            
=> '/(?i)\]/',
            
=> '/(?i)>/',
            
=> '/(?mi)(?<!\\)$/',
            
=> '/(?mi)(?<!\\)$/',
            
=> '/(?i)\*\//',
            
=> '/(?mi)$/',
        );
        
$this->_states = array (
            -
=> 
            array (
                
=> 0,
                
=> 1,
                
=> 2,
                
=> 3,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 5,
                
10 => 6,
                
11 => -1,
                
12 => 7,
                
13 => 8,
            ),
            
=> 
            array (
                
=> -1,
            ),
            
=> 
            array (
                
=> 0,
                
=> 1,
                
=> 2,
                
=> 3,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 5,
                
10 => 6,
                
11 => -1,
                
12 => 7,
                
13 => 8,
            ),
            
=> 
            array (
                
=> 0,
                
=> 1,
                
=> 2,
                
=> 3,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 5,
                
10 => 6,
                
11 => -1,
                
12 => 7,
                
13 => 8,
            ),
            
=> 
            array (
                
=> 0,
                
=> 1,
                
=> 2,
                
=> 3,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 5,
                
10 => 6,
                
11 => -1,
                
12 => 7,
                
13 => 8,
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> 0,
                
=> 4,
            ),
            
=> 
            array (
                
=> 0,
                
=> 1,
                
=> 2,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 7,
                
=> 8,
            ),
            
=> 
            array (
                
=> -1,
            ),
            
=> 
            array (
                
=> -1,
            ),
        );
        
$this->_keywords = array (
            -
=> 
            array (
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 
                array (
                    
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
                    
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
                    
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> -1,
                
10 => -1,
                
11 => 
                array (
                ),
                
12 => -1,
                
13 => -1,
            ),
            
=> 
            array (
                
=> 
                array (
                ),
            ),
            
=> 
            array (
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 
                array (
                    
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
                    
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
                    
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> -1,
                
10 => -1,
                
11 => 
                array (
                ),
                
12 => -1,
                
13 => -1,
            ),
            
=> 
            array (
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 
                array (
                    
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
                    
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
                    
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> -1,
                
10 => -1,
                
11 => 
                array (
                ),
                
12 => -1,
                
13 => -1,
            ),
            
=> 
            array (
                
=> -1,
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 
                array (
                    
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
                    
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
                    
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> -1,
                
10 => -1,
                
11 => 
                array (
                ),
                
12 => -1,
                
13 => -1,
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> -1,
                
=> -1,
            ),
            
=> 
            array (
                
=> -1,
                
=> -1,
                
=> -1,
                
=> 
                array (
                    
'reserved' => '/^(and|and_eq|asm|bitand|bitor|break|case|catch|compl|const_cast|continue|default|delete|do|dynamic_cast|else|for|fortran|friend|goto|if|new|not|not_eq|operator|or|or_eq|private|protected|public|reinterpret_cast|return|sizeof|static_cast|switch|this|throw|try|typeid|using|while|xor|xor_eq|false|true)$/',
                    
'types' => '/^(auto|bool|char|class|const|double|enum|explicit|export|extern|float|inline|int|long|mutable|namespace|register|short|signed|static|struct|template|typedef|typename|union|unsigned|virtual|void|volatile|wchar_t)$/',
                    
'Common Macros' => '/^(NULL|TRUE|FALSE|MAX|MIN|__LINE__|__DATA__|__FILE__|__TIME__|__STDC__)$/',
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> 
                array (
                ),
                
=> -1,
                
=> -1,
            ),
            
=> 
            array (
                
=> 
                array (
                ),
            ),
            
=> 
            array (
                
=> 
                array (
                ),
            ),
        );
        
$this->_parts = array (
            
=> 
            array (
                
=> NULL,
            ),
            
=> 
            array (
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
10 => NULL,
                
11 => NULL,
                
12 => NULL,
                
13 => NULL,
            ),
            
=> 
            array (
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
10 => NULL,
                
11 => NULL,
                
12 => NULL,
                
13 => NULL,
            ),
            
=> 
            array (
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
10 => NULL,
                
11 => NULL,
                
12 => NULL,
                
13 => NULL,
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> NULL,
                
=> NULL,
            ),
            
=> 
            array (
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
                
=> NULL,
            ),
            
=> 
            array (
                
=> NULL,
            ),
            
=> 
            array (
                
=> NULL,
            ),
        );
        
$this->_subst = array (
            -
=> 
            array (
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
10 => false,
                
11 => false,
                
12 => false,
                
13 => false,
            ),
            
=> 
            array (
                
=> false,
            ),
            
=> 
            array (
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
10 => false,
                
11 => false,
                
12 => false,
                
13 => false,
            ),
            
=> 
            array (
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
10 => false,
                
11 => false,
                
12 => false,
                
13 => false,
            ),
            
=> 
            array (
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
10 => false,
                
11 => false,
                
12 => false,
                
13 => false,
            ),
            
=> 
            array (
            ),
            
=> 
            array (
                
=> false,
                
=> false,
            ),
            
=> 
            array (
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
                
=> false,
            ),
            
=> 
            array (
                
=> false,
            ),
            
=> 
            array (
                
=> false,
            ),
        );
        
$this->_conditions = array (
        );
        
$this->_kwmap = array (
            
'reserved' => 'reserved',
            
'types' => 'types',
            
'Common Macros' => 'prepro',
        );
        
$this->_defClass 'code';
        
$this->_checkDefines();
    }
    
}
Онлайн: 2
Реклама