home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / xampp-win32-1.6.7-installer.exe / php / PEAR / Text / Highlighter / CSS.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  12.7 KB  |  437 lines

  1. <?php
  2. /**
  3.  * Auto-generated class. CSS syntax highlighting 
  4.  *
  5.  * PHP version 4 and 5
  6.  *
  7.  * LICENSE: This source file is subject to version 3.0 of the PHP license
  8.  * that is available through the world-wide-web at the following URI:
  9.  * http://www.php.net/license/3_0.txt.  If you did not receive a copy of
  10.  * the PHP License and are unable to obtain it through the web, please
  11.  * send a note to license@php.net so we can mail you a copy immediately.
  12.  *
  13.  * @copyright  2004-2006 Andrey Demenev
  14.  * @license    http://www.php.net/license/3_0.txt  PHP License
  15.  * @link       http://pear.php.net/package/Text_Highlighter
  16.  * @category   Text
  17.  * @package    Text_Highlighter
  18.  * @version    generated from: : css.xml,v 1.2 2008/01/01 23:45:07 ssttoo Exp 
  19.  * @author Andrey Demenev <demenev@gmail.com>
  20.  *
  21.  */
  22.  
  23. /**
  24.  * @ignore
  25.  */
  26.  
  27. require_once 'Text/Highlighter.php';
  28.  
  29. /**
  30.  * Auto-generated class. CSS syntax highlighting
  31.  *
  32.  * @author Andrey Demenev <demenev@gmail.com>
  33.  * @category   Text
  34.  * @package    Text_Highlighter
  35.  * @copyright  2004-2006 Andrey Demenev
  36.  * @license    http://www.php.net/license/3_0.txt  PHP License
  37.  * @version    Release: 0.7.1
  38.  * @link       http://pear.php.net/package/Text_Highlighter
  39.  */
  40. class  Text_Highlighter_CSS extends Text_Highlighter
  41. {
  42.     var $_language = 'css';
  43.  
  44.     /**
  45.      * PHP4 Compatible Constructor
  46.      *
  47.      * @param array  $options
  48.      * @access public
  49.      */
  50.     function Text_Highlighter_CSS($options=array())
  51.     {
  52.         $this->__construct($options);
  53.     }
  54.  
  55.  
  56.     /**
  57.      *  Constructor
  58.      *
  59.      * @param array  $options
  60.      * @access public
  61.      */
  62.     function __construct($options=array())
  63.     {
  64.  
  65.         $this->_options = $options;
  66.         $this->_regs = array (
  67.             -1 => '/((?i)\\/\\*)|((?i)(@[a-z\\d]+))|((?i)(((\\.|#)?[a-z]+[a-z\\d\\-]*(?![a-z\\d\\-]))|(\\*))(?!\\s*:\\s*[\\s\\{]))|((?i):[a-z][a-z\\d\\-]*)|((?i)\\[)|((?i)\\{)/',
  68.             0 => '//',
  69.             1 => '/((?i)\\d*\\.?\\d+(\\%|em|ex|pc|pt|px|in|mm|cm))|((?i)\\d*\\.?\\d+)|((?i)[a-z][a-z\\d\\-]*)|((?i)#([\\da-f]{6}|[\\da-f]{3})\\b)/',
  70.             2 => '/((?i)\')|((?i)")|((?i)[\\w\\-\\:]+)/',
  71.             3 => '/((?i)\\/\\*)|((?i)[a-z][a-z\\d\\-]*\\s*:)|((?i)(((\\.|#)?[a-z]+[a-z\\d\\-]*(?![a-z\\d\\-]))|(\\*))(?!\\s*:\\s*[\\s\\{]))|((?i)\\{)/',
  72.             4 => '/((?i)\\\\[\\\\(\\\\)\\\\])/',
  73.             5 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`)/',
  74.             6 => '/((?i)\\\\\\\\|\\\\"|\\\\\'|\\\\`|\\\\t|\\\\n|\\\\r)/',
  75.         );
  76.         $this->_counts = array (
  77.             -1 => 
  78.             array (
  79.                 0 => 0,
  80.                 1 => 1,
  81.                 2 => 4,
  82.                 3 => 0,
  83.                 4 => 0,
  84.                 5 => 0,
  85.             ),
  86.             0 => 
  87.             array (
  88.             ),
  89.             1 => 
  90.             array (
  91.                 0 => 1,
  92.                 1 => 0,
  93.                 2 => 0,
  94.                 3 => 1,
  95.             ),
  96.             2 => 
  97.             array (
  98.                 0 => 0,
  99.                 1 => 0,
  100.                 2 => 0,
  101.             ),
  102.             3 => 
  103.             array (
  104.                 0 => 0,
  105.                 1 => 0,
  106.                 2 => 4,
  107.                 3 => 0,
  108.             ),
  109.             4 => 
  110.             array (
  111.                 0 => 0,
  112.             ),
  113.             5 => 
  114.             array (
  115.                 0 => 0,
  116.             ),
  117.             6 => 
  118.             array (
  119.                 0 => 0,
  120.             ),
  121.         );
  122.         $this->_delim = array (
  123.             -1 => 
  124.             array (
  125.                 0 => 'comment',
  126.                 1 => '',
  127.                 2 => '',
  128.                 3 => '',
  129.                 4 => 'brackets',
  130.                 5 => 'brackets',
  131.             ),
  132.             0 => 
  133.             array (
  134.             ),
  135.             1 => 
  136.             array (
  137.                 0 => '',
  138.                 1 => '',
  139.                 2 => '',
  140.                 3 => '',
  141.             ),
  142.             2 => 
  143.             array (
  144.                 0 => 'quotes',
  145.                 1 => 'quotes',
  146.                 2 => '',
  147.             ),
  148.             3 => 
  149.             array (
  150.                 0 => 'comment',
  151.                 1 => 'reserved',
  152.                 2 => '',
  153.                 3 => 'brackets',
  154.             ),
  155.             4 => 
  156.             array (
  157.                 0 => '',
  158.             ),
  159.             5 => 
  160.             array (
  161.                 0 => '',
  162.             ),
  163.             6 => 
  164.             array (
  165.                 0 => '',
  166.             ),
  167.         );
  168.         $this->_inner = array (
  169.             -1 => 
  170.             array (
  171.                 0 => 'comment',
  172.                 1 => 'var',
  173.                 2 => 'identifier',
  174.                 3 => 'special',
  175.                 4 => 'code',
  176.                 5 => 'code',
  177.             ),
  178.             0 => 
  179.             array (
  180.             ),
  181.             1 => 
  182.             array (
  183.                 0 => 'number',
  184.                 1 => 'number',
  185.                 2 => 'code',
  186.                 3 => 'var',
  187.             ),
  188.             2 => 
  189.             array (
  190.                 0 => 'string',
  191.                 1 => 'string',
  192.                 2 => 'var',
  193.             ),
  194.             3 => 
  195.             array (
  196.                 0 => 'comment',
  197.                 1 => 'code',
  198.                 2 => 'identifier',
  199.                 3 => 'code',
  200.             ),
  201.             4 => 
  202.             array (
  203.                 0 => 'string',
  204.             ),
  205.             5 => 
  206.             array (
  207.                 0 => 'special',
  208.             ),
  209.             6 => 
  210.             array (
  211.                 0 => 'special',
  212.             ),
  213.         );
  214.         $this->_end = array (
  215.             0 => '/(?i)\\*\\//',
  216.             1 => '/(?i)(?=;|\\})/',
  217.             2 => '/(?i)\\]/',
  218.             3 => '/(?i)\\}/',
  219.             4 => '/(?i)\\)/',
  220.             5 => '/(?i)\'/',
  221.             6 => '/(?i)"/',
  222.         );
  223.         $this->_states = array (
  224.             -1 => 
  225.             array (
  226.                 0 => 0,
  227.                 1 => -1,
  228.                 2 => -1,
  229.                 3 => -1,
  230.                 4 => 2,
  231.                 5 => 3,
  232.             ),
  233.             0 => 
  234.             array (
  235.             ),
  236.             1 => 
  237.             array (
  238.                 0 => -1,
  239.                 1 => -1,
  240.                 2 => -1,
  241.                 3 => -1,
  242.             ),
  243.             2 => 
  244.             array (
  245.                 0 => 5,
  246.                 1 => 6,
  247.                 2 => -1,
  248.             ),
  249.             3 => 
  250.             array (
  251.                 0 => 0,
  252.                 1 => 1,
  253.                 2 => -1,
  254.                 3 => 3,
  255.             ),
  256.             4 => 
  257.             array (
  258.                 0 => -1,
  259.             ),
  260.             5 => 
  261.             array (
  262.                 0 => -1,
  263.             ),
  264.             6 => 
  265.             array (
  266.                 0 => -1,
  267.             ),
  268.         );
  269.         $this->_keywords = array (
  270.             -1 => 
  271.             array (
  272.                 0 => -1,
  273.                 1 => 
  274.                 array (
  275.                 ),
  276.                 2 => 
  277.                 array (
  278.                 ),
  279.                 3 => 
  280.                 array (
  281.                 ),
  282.                 4 => -1,
  283.                 5 => -1,
  284.             ),
  285.             0 => 
  286.             array (
  287.             ),
  288.             1 => 
  289.             array (
  290.                 0 => 
  291.                 array (
  292.                 ),
  293.                 1 => 
  294.                 array (
  295.                 ),
  296.                 2 => 
  297.                 array (
  298.                     'propertyValue' => '/^((?i)far-left|left|center-left|center-right|center|far-right|right-side|right|behind|leftwards|rightwards|inherit|scroll|fixed|transparent|none|repeat-x|repeat-y|repeat|no-repeat|collapse|separate|auto|top|bottom|both|open-quote|close-quote|no-open-quote|no-close-quote|crosshair|default|pointer|move|e-resize|ne-resize|nw-resize|n-resize|se-resize|sw-resize|s-resize|text|wait|help|ltr|rtl|inline|block|list-item|run-in|compact|marker|table|inline-table|table-row-group|table-header-group|table-footer-group|table-row|table-column-group|table-column|table-cell|table-caption|below|level|above|higher|lower|show|hide|caption|icon|menu|message-box|small-caption|status-bar|normal|wider|narrower|ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|italic|oblique|small-caps|bold|bolder|lighter|inside|outside|disc|circle|square|decimal|decimal-leading-zero|lower-roman|upper-roman|lower-greek|lower-alpha|lower-latin|upper-alpha|upper-latin|hebrew|armenian|georgian|cjk-ideographic|hiragana|katakana|hiragana-iroha|katakana-iroha|crop|cross|invert|visible|hidden|always|avoid|x-low|low|medium|high|x-high|mix?|repeat?|static|relative|absolute|portrait|landscape|spell-out|once|digits|continuous|code|x-slow|slow|fast|x-fast|faster|slower|justify|underline|overline|line-through|blink|capitalize|uppercase|lowercase|embed|bidi-override|baseline|sub|super|text-top|middle|text-bottom|silent|x-soft|soft|loud|x-loud|pre|nowrap|serif|sans-serif|cursive|fantasy|monospace|empty|string|strict|loose|char|true|false|dotted|dashed|solid|double|groove|ridge|inset|outset|larger|smaller|xx-small|x-small|small|large|x-large|xx-large|all|newspaper|distribute|distribute-all-lines|distribute-center-last|inter-word|inter-ideograph|inter-cluster|kashida|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|keep-all|break-all|break-word|lr-tb|tb-rl|thin|thick|inline-block|w-resize|hand|distribute-letter|distribute-space|whitespace|male|female|child)$/',
  299.                     'namedcolor' => '/^((?i)aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|purple|red|silver|teal|white|yellow|activeborder|activecaption|appworkspace|background|buttonface|buttonhighlight|buttonshadow|buttontext|captiontext|graytext|highlight|highlighttext|inactiveborder|inactivecaption|inactivecaptiontext|infobackground|infotext|menu|menutext|scrollbar|threeddarkshadow|threedface|threedhighlight|threedlightshadow|threedshadow|window|windowframe|windowtext)$/',
  300.                 ),
  301.                 3 => 
  302.                 array (
  303.                 ),
  304.             ),
  305.             2 => 
  306.             array (
  307.                 0 => -1,
  308.                 1 => -1,
  309.                 2 => 
  310.                 array (
  311.                 ),
  312.             ),
  313.             3 => 
  314.             array (
  315.                 0 => -1,
  316.                 1 => -1,
  317.                 2 => 
  318.                 array (
  319.                 ),
  320.                 3 => -1,
  321.             ),
  322.             4 => 
  323.             array (
  324.                 0 => 
  325.                 array (
  326.                 ),
  327.             ),
  328.             5 => 
  329.             array (
  330.                 0 => 
  331.                 array (
  332.                 ),
  333.             ),
  334.             6 => 
  335.             array (
  336.                 0 => 
  337.                 array (
  338.                 ),
  339.             ),
  340.         );
  341.         $this->_parts = array (
  342.             0 => 
  343.             array (
  344.             ),
  345.             1 => 
  346.             array (
  347.                 0 => 
  348.                 array (
  349.                     1 => 'string',
  350.                 ),
  351.                 1 => NULL,
  352.                 2 => NULL,
  353.                 3 => NULL,
  354.             ),
  355.             2 => 
  356.             array (
  357.                 0 => NULL,
  358.                 1 => NULL,
  359.                 2 => NULL,
  360.             ),
  361.             3 => 
  362.             array (
  363.                 0 => NULL,
  364.                 1 => NULL,
  365.                 2 => NULL,
  366.                 3 => NULL,
  367.             ),
  368.             4 => 
  369.             array (
  370.                 0 => NULL,
  371.             ),
  372.             5 => 
  373.             array (
  374.                 0 => NULL,
  375.             ),
  376.             6 => 
  377.             array (
  378.                 0 => NULL,
  379.             ),
  380.         );
  381.         $this->_subst = array (
  382.             -1 => 
  383.             array (
  384.                 0 => false,
  385.                 1 => false,
  386.                 2 => false,
  387.                 3 => false,
  388.                 4 => false,
  389.                 5 => false,
  390.             ),
  391.             0 => 
  392.             array (
  393.             ),
  394.             1 => 
  395.             array (
  396.                 0 => false,
  397.                 1 => false,
  398.                 2 => false,
  399.                 3 => false,
  400.             ),
  401.             2 => 
  402.             array (
  403.                 0 => false,
  404.                 1 => false,
  405.                 2 => false,
  406.             ),
  407.             3 => 
  408.             array (
  409.                 0 => false,
  410.                 1 => false,
  411.                 2 => false,
  412.                 3 => false,
  413.             ),
  414.             4 => 
  415.             array (
  416.                 0 => false,
  417.             ),
  418.             5 => 
  419.             array (
  420.                 0 => false,
  421.             ),
  422.             6 => 
  423.             array (
  424.                 0 => false,
  425.             ),
  426.         );
  427.         $this->_conditions = array (
  428.         );
  429.         $this->_kwmap = array (
  430.             'propertyValue' => 'string',
  431.             'namedcolor' => 'var',
  432.         );
  433.         $this->_defClass = 'code';
  434.         $this->_checkDefines();
  435.     }
  436.     
  437. }