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 / MYSQL.php < prev    next >
Encoding:
PHP Script  |  2008-07-02  |  15.3 KB  |  434 lines

  1. <?php
  2. /**
  3.  * Auto-generated class. MYSQL 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: : mysql.xml,v 1.1 2007/06/03 02:35:28 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. MYSQL 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_MYSQL extends Text_Highlighter
  41. {
  42.     var $_language = 'mysql';
  43.  
  44.     /**
  45.      * PHP4 Compatible Constructor
  46.      *
  47.      * @param array  $options
  48.      * @access public
  49.      */
  50.     function Text_Highlighter_MYSQL($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)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
  68.             0 => '//',
  69.             1 => '//',
  70.             2 => '/((?i)\\\\.)/',
  71.             3 => '/((?i)`)|((?i)\\/\\*)|((?i)(#|--\\s).*)|((?i)[a-z_]\\w*(?=\\s*\\())|((?i)[a-z_]\\w*)|((?i)")|((?i)\\()|((?i)\')|((?i)((\\d+|((\\d*\\.\\d+)|(\\d+\\.\\d*)))[eE][+-]?\\d+))|((?i)(\\d*\\.\\d+)|(\\d+\\.\\d*))|((?i)\\d+l?|\\b0l?\\b)|((?i)0[xX][\\da-f]+l?)/',
  72.             4 => '/((?i)\\\\.)/',
  73.         );
  74.         $this->_counts = array (
  75.             -1 => 
  76.             array (
  77.                 0 => 0,
  78.                 1 => 0,
  79.                 2 => 1,
  80.                 3 => 0,
  81.                 4 => 0,
  82.                 5 => 0,
  83.                 6 => 0,
  84.                 7 => 0,
  85.                 8 => 5,
  86.                 9 => 2,
  87.                 10 => 0,
  88.                 11 => 0,
  89.             ),
  90.             0 => 
  91.             array (
  92.             ),
  93.             1 => 
  94.             array (
  95.             ),
  96.             2 => 
  97.             array (
  98.                 0 => 0,
  99.             ),
  100.             3 => 
  101.             array (
  102.                 0 => 0,
  103.                 1 => 0,
  104.                 2 => 1,
  105.                 3 => 0,
  106.                 4 => 0,
  107.                 5 => 0,
  108.                 6 => 0,
  109.                 7 => 0,
  110.                 8 => 5,
  111.                 9 => 2,
  112.                 10 => 0,
  113.                 11 => 0,
  114.             ),
  115.             4 => 
  116.             array (
  117.                 0 => 0,
  118.             ),
  119.         );
  120.         $this->_delim = array (
  121.             -1 => 
  122.             array (
  123.                 0 => 'quotes',
  124.                 1 => 'comment',
  125.                 2 => '',
  126.                 3 => '',
  127.                 4 => '',
  128.                 5 => 'quotes',
  129.                 6 => 'brackets',
  130.                 7 => 'quotes',
  131.                 8 => '',
  132.                 9 => '',
  133.                 10 => '',
  134.                 11 => '',
  135.             ),
  136.             0 => 
  137.             array (
  138.             ),
  139.             1 => 
  140.             array (
  141.             ),
  142.             2 => 
  143.             array (
  144.                 0 => '',
  145.             ),
  146.             3 => 
  147.             array (
  148.                 0 => 'quotes',
  149.                 1 => 'comment',
  150.                 2 => '',
  151.                 3 => '',
  152.                 4 => '',
  153.                 5 => 'quotes',
  154.                 6 => 'brackets',
  155.                 7 => 'quotes',
  156.                 8 => '',
  157.                 9 => '',
  158.                 10 => '',
  159.                 11 => '',
  160.             ),
  161.             4 => 
  162.             array (
  163.                 0 => '',
  164.             ),
  165.         );
  166.         $this->_inner = array (
  167.             -1 => 
  168.             array (
  169.                 0 => 'identifier',
  170.                 1 => 'comment',
  171.                 2 => 'comment',
  172.                 3 => 'identifier',
  173.                 4 => 'identifier',
  174.                 5 => 'string',
  175.                 6 => 'code',
  176.                 7 => 'string',
  177.                 8 => 'number',
  178.                 9 => 'number',
  179.                 10 => 'number',
  180.                 11 => 'number',
  181.             ),
  182.             0 => 
  183.             array (
  184.             ),
  185.             1 => 
  186.             array (
  187.             ),
  188.             2 => 
  189.             array (
  190.                 0 => 'special',
  191.             ),
  192.             3 => 
  193.             array (
  194.                 0 => 'identifier',
  195.                 1 => 'comment',
  196.                 2 => 'comment',
  197.                 3 => 'identifier',
  198.                 4 => 'identifier',
  199.                 5 => 'string',
  200.                 6 => 'code',
  201.                 7 => 'string',
  202.                 8 => 'number',
  203.                 9 => 'number',
  204.                 10 => 'number',
  205.                 11 => 'number',
  206.             ),
  207.             4 => 
  208.             array (
  209.                 0 => 'special',
  210.             ),
  211.         );
  212.         $this->_end = array (
  213.             0 => '/(?i)`/',
  214.             1 => '/(?i)\\*\\//',
  215.             2 => '/(?i)"/',
  216.             3 => '/(?i)\\)/',
  217.             4 => '/(?i)\'/',
  218.         );
  219.         $this->_states = array (
  220.             -1 => 
  221.             array (
  222.                 0 => 0,
  223.                 1 => 1,
  224.                 2 => -1,
  225.                 3 => -1,
  226.                 4 => -1,
  227.                 5 => 2,
  228.                 6 => 3,
  229.                 7 => 4,
  230.                 8 => -1,
  231.                 9 => -1,
  232.                 10 => -1,
  233.                 11 => -1,
  234.             ),
  235.             0 => 
  236.             array (
  237.             ),
  238.             1 => 
  239.             array (
  240.             ),
  241.             2 => 
  242.             array (
  243.                 0 => -1,
  244.             ),
  245.             3 => 
  246.             array (
  247.                 0 => 0,
  248.                 1 => 1,
  249.                 2 => -1,
  250.                 3 => -1,
  251.                 4 => -1,
  252.                 5 => 2,
  253.                 6 => 3,
  254.                 7 => 4,
  255.                 8 => -1,
  256.                 9 => -1,
  257.                 10 => -1,
  258.                 11 => -1,
  259.             ),
  260.             4 => 
  261.             array (
  262.                 0 => -1,
  263.             ),
  264.         );
  265.         $this->_keywords = array (
  266.             -1 => 
  267.             array (
  268.                 0 => -1,
  269.                 1 => -1,
  270.                 2 => 
  271.                 array (
  272.                 ),
  273.                 3 => 
  274.                 array (
  275.                     'function' => '/^((?i)abs|acos|adddate|ascii|asin|atan|atan2|avg|benchmark|bin|ceiling|char|coalesce|concat|conv|cos|cot|count|curdate|curtime|database|dayname|dayofmonth|dayofweek|dayofyear|decode|degrees|elt|encode|encrypt|exp|extract|field|floor|format|greatest|hex|hour|if|ifnull|insert|instr|interval|isnull|lcase|least|left|length|locate|log|log10|lower|lpad|ltrim|max|md5|mid|min|minute|mod|month|monthname|now|nullif|oct|ord|password|pi|position|pow|power|prepare|quarter|radians|rand|repeat|replace|reverse|right|round|rpad|rtrim|second|sign|sin|soundex|space|sqrt|std|stddev|strcmp|subdate|substring|sum|sysdate|tan|trim|truncate|ucase|upper|user|version|week|weekday|year)$/',
  276.                 ),
  277.                 4 => 
  278.                 array (
  279.                     'reserved' => '/^((?i)action|add|aggregate|all|alter|after|and|as|asc|avg|avg_row_length|auto_increment|between|bigint|bit|binary|blob|bool|both|by|cascade|case|char|character|change|check|checksum|column|columns|comment|constraint|create|cross|current_date|current_time|current_timestamp|data|database|databases|date|datetime|day|day_hour|day_minute|day_second|dayofmonth|dayofweek|dayofyear|dec|decimal|default|delayed|delay_key_write|delete|desc|describe|distinct|distinctrow|double|drop|end|else|escape|escaped|enclosed|enum|explain|exists|fields|file|first|float|float4|float8|flush|foreign|from|for|full|function|global|grant|grants|group|having|heap|high_priority|hour|hour_minute|hour_second|hosts|identified|ignore|in|index|infile|inner|insert|insert_id|int|integer|interval|int1|int2|int3|int4|int8|into|if|is|isam|join|key|keys|kill|last_insert_id|leading|left|length|like|lines|limit|load|local|lock|logs|long|longblob|longtext|low_priority|max|max_rows|match|mediumblob|mediumtext|mediumint|middleint|min_rows|minute|minute_second|modify|month|monthname|myisam|natural|numeric|no|not|null|on|optimize|option|optionally|or|order|outer|outfile|pack_keys|partial|password|precision|primary|procedure|process|processlist|privileges|read|real|references|reload|regexp|rename|replace|restrict|returns|revoke|rlike|row|rows|second|select|set|show|shutdown|smallint|soname|sql_big_tables|sql_big_selects|sql_low_priority_updates|sql_log_off|sql_log_update|sql_select_limit|sql_small_result|sql_big_result|sql_warnings|straight_join|starting|status|string|table|tables|temporary|terminated|text|then|time|timestamp|tinyblob|tinytext|tinyint|trailing|to|type|use|using|unique|unlock|unsigned|update|usage|values|varchar|variables|varying|varbinary|with|write|when|where|year|year_month|zerofill)$/',
  280.                 ),
  281.                 5 => -1,
  282.                 6 => -1,
  283.                 7 => -1,
  284.                 8 => 
  285.                 array (
  286.                 ),
  287.                 9 => 
  288.                 array (
  289.                 ),
  290.                 10 => 
  291.                 array (
  292.                 ),
  293.                 11 => 
  294.                 array (
  295.                 ),
  296.             ),
  297.             0 => 
  298.             array (
  299.             ),
  300.             1 => 
  301.             array (
  302.             ),
  303.             2 => 
  304.             array (
  305.                 0 => 
  306.                 array (
  307.                 ),
  308.             ),
  309.             3 => 
  310.             array (
  311.                 0 => -1,
  312.                 1 => -1,
  313.                 2 => 
  314.                 array (
  315.                 ),
  316.                 3 => 
  317.                 array (
  318.                     'function' => '/^((?i)abs|acos|adddate|ascii|asin|atan|atan2|avg|benchmark|bin|ceiling|char|coalesce|concat|conv|cos|cot|count|curdate|curtime|database|dayname|dayofmonth|dayofweek|dayofyear|decode|degrees|elt|encode|encrypt|exp|extract|field|floor|format|greatest|hex|hour|if|ifnull|insert|instr|interval|isnull|lcase|least|left|length|locate|log|log10|lower|lpad|ltrim|max|md5|mid|min|minute|mod|month|monthname|now|nullif|oct|ord|password|pi|position|pow|power|prepare|quarter|radians|rand|repeat|replace|reverse|right|round|rpad|rtrim|second|sign|sin|soundex|space|sqrt|std|stddev|strcmp|subdate|substring|sum|sysdate|tan|trim|truncate|ucase|upper|user|version|week|weekday|year)$/',
  319.                 ),
  320.                 4 => 
  321.                 array (
  322.                     'reserved' => '/^((?i)action|add|aggregate|all|alter|after|and|as|asc|avg|avg_row_length|auto_increment|between|bigint|bit|binary|blob|bool|both|by|cascade|case|char|character|change|check|checksum|column|columns|comment|constraint|create|cross|current_date|current_time|current_timestamp|data|database|databases|date|datetime|day|day_hour|day_minute|day_second|dayofmonth|dayofweek|dayofyear|dec|decimal|default|delayed|delay_key_write|delete|desc|describe|distinct|distinctrow|double|drop|end|else|escape|escaped|enclosed|enum|explain|exists|fields|file|first|float|float4|float8|flush|foreign|from|for|full|function|global|grant|grants|group|having|heap|high_priority|hour|hour_minute|hour_second|hosts|identified|ignore|in|index|infile|inner|insert|insert_id|int|integer|interval|int1|int2|int3|int4|int8|into|if|is|isam|join|key|keys|kill|last_insert_id|leading|left|length|like|lines|limit|load|local|lock|logs|long|longblob|longtext|low_priority|max|max_rows|match|mediumblob|mediumtext|mediumint|middleint|min_rows|minute|minute_second|modify|month|monthname|myisam|natural|numeric|no|not|null|on|optimize|option|optionally|or|order|outer|outfile|pack_keys|partial|password|precision|primary|procedure|process|processlist|privileges|read|real|references|reload|regexp|rename|replace|restrict|returns|revoke|rlike|row|rows|second|select|set|show|shutdown|smallint|soname|sql_big_tables|sql_big_selects|sql_low_priority_updates|sql_log_off|sql_log_update|sql_select_limit|sql_small_result|sql_big_result|sql_warnings|straight_join|starting|status|string|table|tables|temporary|terminated|text|then|time|timestamp|tinyblob|tinytext|tinyint|trailing|to|type|use|using|unique|unlock|unsigned|update|usage|values|varchar|variables|varying|varbinary|with|write|when|where|year|year_month|zerofill)$/',
  323.                 ),
  324.                 5 => -1,
  325.                 6 => -1,
  326.                 7 => -1,
  327.                 8 => 
  328.                 array (
  329.                 ),
  330.                 9 => 
  331.                 array (
  332.                 ),
  333.                 10 => 
  334.                 array (
  335.                 ),
  336.                 11 => 
  337.                 array (
  338.                 ),
  339.             ),
  340.             4 => 
  341.             array (
  342.                 0 => 
  343.                 array (
  344.                 ),
  345.             ),
  346.         );
  347.         $this->_parts = array (
  348.             0 => 
  349.             array (
  350.             ),
  351.             1 => 
  352.             array (
  353.             ),
  354.             2 => 
  355.             array (
  356.                 0 => NULL,
  357.             ),
  358.             3 => 
  359.             array (
  360.                 0 => NULL,
  361.                 1 => NULL,
  362.                 2 => NULL,
  363.                 3 => NULL,
  364.                 4 => NULL,
  365.                 5 => NULL,
  366.                 6 => NULL,
  367.                 7 => NULL,
  368.                 8 => NULL,
  369.                 9 => NULL,
  370.                 10 => NULL,
  371.                 11 => NULL,
  372.             ),
  373.             4 => 
  374.             array (
  375.                 0 => NULL,
  376.             ),
  377.         );
  378.         $this->_subst = array (
  379.             -1 => 
  380.             array (
  381.                 0 => false,
  382.                 1 => false,
  383.                 2 => false,
  384.                 3 => false,
  385.                 4 => false,
  386.                 5 => false,
  387.                 6 => false,
  388.                 7 => false,
  389.                 8 => false,
  390.                 9 => false,
  391.                 10 => false,
  392.                 11 => false,
  393.             ),
  394.             0 => 
  395.             array (
  396.             ),
  397.             1 => 
  398.             array (
  399.             ),
  400.             2 => 
  401.             array (
  402.                 0 => false,
  403.             ),
  404.             3 => 
  405.             array (
  406.                 0 => false,
  407.                 1 => false,
  408.                 2 => false,
  409.                 3 => false,
  410.                 4 => false,
  411.                 5 => false,
  412.                 6 => false,
  413.                 7 => false,
  414.                 8 => false,
  415.                 9 => false,
  416.                 10 => false,
  417.                 11 => false,
  418.             ),
  419.             4 => 
  420.             array (
  421.                 0 => false,
  422.             ),
  423.         );
  424.         $this->_conditions = array (
  425.         );
  426.         $this->_kwmap = array (
  427.             'function' => 'reserved',
  428.             'reserved' => 'reserved',
  429.         );
  430.         $this->_defClass = 'code';
  431.         $this->_checkDefines();
  432.     }
  433.     
  434. }