plugins/geshi/geshi/vhdl.php
changeset 2 9e3258dfae15
parent 0 441963e5b07a
child 3 f3e2bbbd2155
equal deleted inserted replaced
1:c715631f809a 2:9e3258dfae15
     2 /*************************************************************************************
     2 /*************************************************************************************
     3  * vhdl.php
     3  * vhdl.php
     4  * --------
     4  * --------
     5  * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de)
     5  * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de)
     6  * Copyright: (c) 2005 Alexander Krause
     6  * Copyright: (c) 2005 Alexander Krause
     7  * Release Version: 1.0.7.20
     7  * Release Version: 1.0.8.2
     8  * Date Started: 2005/06/15
     8  * Date Started: 2005/06/15
     9  * 
     9  *
    10  * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi.
    10  * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi.
    11  *
    11  *
    12  * CHANGES
    12  * CHANGES
    13  * -------
    13  * -------
       
    14  * 2008/05/23 (1.0.7.22)
       
    15  *  -  Added description of extra language features (SF#1970248)
       
    16  *  -  Optimized regexp group 0 somewhat
    14  * 2006/06/15 (1.0.0)
    17  * 2006/06/15 (1.0.0)
    15  *  -  First Release
    18  *  -  First Release
    16  *
    19  *
    17  * TODO
    20  * TODO
    18  * ----
    21  * ----
    34  *   You should have received a copy of the GNU General Public License
    37  *   You should have received a copy of the GNU General Public License
    35  *   along with GeSHi; if not, write to the Free Software
    38  *   along with GeSHi; if not, write to the Free Software
    36  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    39  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    37  *
    40  *
    38  ************************************************************************************/
    41  ************************************************************************************/
    39  
    42 
    40 $language_data = array (
    43 $language_data = array (
    41     'LANG_NAME' => 'VHDL',
    44     'LANG_NAME' => 'VHDL',
    42     'COMMENT_SINGLE' => array(1 => '--'),
    45     'COMMENT_SINGLE' => array(1 => '--'),
    43     'COMMENT_MULTI' => array(),
    46     'COMMENT_MULTI' => array('%' => '%'),
    44     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    47     'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
    45     'QUOTEMARKS' => array('"'),
    48     'QUOTEMARKS' => array('"'),
    46     'ESCAPE_CHAR' => '',
    49     'ESCAPE_CHAR' => '',
    47     'KEYWORDS' => array(
    50     'KEYWORDS' => array(
    48         /*keywords*/
    51         /*keywords*/
    49         1 => array(
    52         1 => array(
    50             'access','after','alias','all','assert','architecture','begin',
    53             'access','after','alias','all','assert','attribute','architecture','begin',
    51             'block','body','buffer','bus','case','component','configuration','constant',
    54             'block','body','buffer','bus','case','component','configuration','constant',
    52             'disconnect','downto','else','elsif','end','entity','exit','file','for',
    55             'disconnect','downto','else','elsif','end','entity','exit','file','for',
    53             'function','generate','generic','group','guarded','if','impure','in',
    56             'function','generate','generic','group','guarded','if','impure','in',
    54             'inertial','inout','is','label','library','linkage','literal','loop',
    57             'inertial','inout','is','label','library','linkage','literal','loop',
    55             'map','new','next','null','of','on','open','others','out','package',
    58             'map','new','next','null','of','on','open','others','out','package',
    56             'port','postponed','procedure','process','pure','range','record','register',
    59             'port','postponed','procedure','process','pure','range','record','register',
    57             'reject','report','return','select','severity','signal','shared','subtype',
    60             'reject','report','return','select','severity','signal','shared','subtype',
    58             'then','to','transport','type','unaffected','units','until','use','variable',
    61             'then','to','transport','type','unaffected','units','until','use','variable',
    59             'wait','when','while','with','note','warning','error','failure','and',
    62             'wait','when','while','with','note','warning','error','failure','and',
    60             'or','xor','not','nor'
    63             'or','xor','not','nor','used','memory','segments','dff','dffe','help_id',
       
    64             'mod','info','latch','rising_edge','falling_edge'
    61         ),
    65         ),
    62         /*types*/
    66         /*types*/
    63         2 => array(
    67         2 => array(
    64             'bit','bit_vector','character','boolean','integer','real','time','string',
    68             'bit','bit_vector','character','boolean','integer','real','time','string',
    65             'severity_level','positive','natural','signed','unsigned','line','text',
    69             'severity_level','positive','natural','signed','unsigned','line','text',
    66             'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state',
    70             'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state',
    67             'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength',
    71             'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength',
    68             'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector'
    72             'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector',
       
    73             'work','ieee','std_logic_signed','std_logic_1164','std_logic_arith',
       
    74             'numeric_std'
       
    75 
    69         ),
    76         ),
    70         /*operators*/
    77         /*operators*/
    71         3 => array(
       
    72                 '=','<=',':=','=>','=='
       
    73         )
       
    74     ),
    78     ),
    75     'SYMBOLS' => array(
    79     'SYMBOLS' => array(
    76         '[', ']', '(', ')',';','<','>',':'
    80         '[', ']', '(', ')',
       
    81         ';',':',
       
    82         '<','>','=','<=',':=','=>','=='
    77     ),
    83     ),
    78     'CASE_SENSITIVE' => array(
    84     'CASE_SENSITIVE' => array(
    79         GESHI_COMMENTS => true,
    85         GESHI_COMMENTS => false,
    80         1 => false,
    86         1 => false,
    81         2 => false
    87         2 => false
    82         ),
    88         ),
    83     'STYLES' => array(
    89     'STYLES' => array(
    84         'KEYWORDS' => array(
    90         'KEYWORDS' => array(
    85             1 => 'color: #000000; font-weight: bold;',
    91             1 => 'color: #000080; font-weight: bold;',
    86             2 => 'color: #aa0000;'
    92             2 => 'color: #0000ff;'
    87             ),
    93             ),
    88         'COMMENTS' => array(
    94         'COMMENTS' => array(
    89             1 => 'color: #adadad; font-style: italic;'
    95             1 => 'color: #008000; font-style: italic;',
       
    96             'MULTI' => 'color: #008000; font-style: italic;'
    90             ),
    97             ),
    91         'ESCAPE_CHAR' => array(
    98         'ESCAPE_CHAR' => array(
    92             0 => 'color: #000099; font-weight: bold;'
    99             0 => 'color: #000099; font-weight: bold;'
    93             ),
   100             ),
    94         'BRACKETS' => array(
   101         'BRACKETS' => array(
    95             0 => 'color: #66cc66;'
   102             0 => 'color: #000066;'
    96             ),
   103             ),
    97         'STRINGS' => array(
   104         'STRINGS' => array(
    98             0 => 'color: #7f007f;'
   105             0 => 'color: #7f007f;'
    99             ),
   106             ),
   100         'NUMBERS' => array(
   107         'NUMBERS' => array(
   101             0 => 'color: #ff0000;'
   108             0 => 'color: #ff0000;'
   102             ),
   109             ),
   103         'METHODS' => array(
   110         'METHODS' => array(
   104             ),
   111             ),
   105         'SYMBOLS' => array(
   112         'SYMBOLS' => array(
   106             0 => 'color: #66cc66;'
   113             0 => 'color: #000066;'
   107             ),
   114             ),
   108         'REGEXPS' => array(
   115         'REGEXPS' => array(
   109             0 => 'color: #ff0000;',
   116             0 => 'color: #ff0000;',
   110             1 => 'color: #ff0000;',
   117             1 => 'color: #ff0000;'
   111             2 => 'color: #ff0000;',
       
   112             3 => 'color: #ff0000;'
       
   113             ),
   118             ),
   114         'SCRIPT' => array(
   119         'SCRIPT' => array(
   115             )
   120             )
   116         ),
   121         ),
   117     'URLS' => array(
   122     'URLS' => array(
   120     ),
   125     ),
   121     'OOLANG' => false,
   126     'OOLANG' => false,
   122     'OBJECT_SPLITTERS' => array(
   127     'OBJECT_SPLITTERS' => array(
   123         ),
   128         ),
   124     'REGEXPS' => array(
   129     'REGEXPS' => array(
   125         0 => '(\b(0x)[0-9a-fA-F]{2,}[hH]?|\b(0x)?[0-9a-fA-F]{2,}[hH])|'.
   130         //Hex numbers and scientific notation for numbers
   126         '(\b[0-9]{1,}((\.){1}[0-9]{1,}){0,1}(E)[\-]{0,1}[0-9]{1,})|'.
   131         0 => '(\b0x[0-9a-fA-F]+|\b\d[0-9a-fA-F]+[hH])|'.
   127          '(\b(ns))|'.
   132             '(\b\d+?(\.\d+?)?E[+\-]?\d+)|(\bns)|'.
   128          "('[0-9a-zA-Z]+)",
   133             "('[0-9a-zA-Z]+(?!'))",
   129          1 => "\b(''[0-9]'')"
   134         //Number characters?
       
   135         1 => "\b(''\d'')"
   130         ),
   136         ),
   131     'STRICT_MODE_APPLIES' => GESHI_NEVER,
   137     'STRICT_MODE_APPLIES' => GESHI_NEVER,
   132     'SCRIPT_DELIMITERS' => array(
   138     'SCRIPT_DELIMITERS' => array(
   133         ),
   139         ),
   134     'HIGHLIGHT_STRICT_BLOCK' => array(
   140     'HIGHLIGHT_STRICT_BLOCK' => array(
   135         )
   141         )
   136 );
   142 );
   137  
   143 
   138 ?>
   144 ?>