[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/geshi/geshi/src/geshi/ -> systemverilog.php (source)

   1  <?php
   2  /************************************************************************************
   3   * systemverilog.php
   4   * -------
   5   * Author: Sean O'Boyle
   6   * Copyright: (C) 2008 IntelligentDV
   7   * Release Version: 1.0.9.1
   8   * Date Started: 2008/06/25
   9   *
  10   * SystemVerilog IEEE 1800-2009(draft8) language file for GeSHi.
  11   *
  12   * CHANGES
  13   * -------
  14   * 2008/06/25 (1.0.0)
  15   *  -  First Release
  16   *
  17   * TODO (updated 2008/06/25)
  18   * -------------------------
  19   *
  20   *************************************************************************************
  21   *
  22   *   This file is part of GeSHi.
  23   *
  24   *  GeSHi is free software: you can redistribute it and/or modify
  25   *  it under the terms of the GNU General Public License as published by
  26   *  the Free Software Foundation, either version 3 of the License, or
  27   *  (at your option) any later version.
  28   *
  29   *  This program is distributed in the hope that it will be useful,
  30   *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  31   *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  32   *  GNU General Public License for more details.
  33   *
  34   *  You should have received a copy of the GNU General Public License
  35   *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  36   *
  37   ************************************************************************
  38   * Title:        SystemVerilog Language Keywords File for GeSHi
  39   * Description:  This file contains the SV keywords defined in the
  40   *               IEEE1800-2009 Draft Standard in the format expected by
  41   *               GeSHi.
  42   *
  43   * Original Author: Sean O'Boyle
  44   * Contact:         seanoboyle@intelligentdv.com
  45   * Company:         Intelligent Design Verification
  46   * Company URL:     http://intelligentdv.com
  47   *
  48   * Download the most recent version here:
  49   *                  http://intelligentdv.com/downloads
  50   *
  51   * File Bugs Here:  http://bugs.intelligentdv.com
  52   *        Project:  SyntaxFiles
  53   *
  54   * File: systemverilog.php
  55   * $LastChangedBy$
  56   * $LastChangedDate$
  57   * $LastChangedRevision$
  58   *
  59   ************************************************************************/
  60  
  61  $language_data = array (
  62      'LANG_NAME' => 'SystemVerilog',
  63      'COMMENT_SINGLE' => array(1 => '//'),
  64      'COMMENT_MULTI' => array('/*' => '*/'),
  65      'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
  66      'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  67      'QUOTEMARKS' => array('"'),
  68      'ESCAPE_CHAR' => '\\',
  69      'KEYWORDS' => array(
  70          // system tasks
  71          1 => array(
  72              'acos','acosh','asin','asinh','assertfailoff','assertfailon',
  73              'assertkill','assertnonvacuouson','assertoff','asserton',
  74              'assertpassoff','assertpasson','assertvacuousoff','async$and$array',
  75              'async$and$plane','async$nand$array','async$nand$plane',
  76              'async$nor$array','async$nor$plane','async$or$array',
  77              'async$or$plane','atan','atan2','atanh','bits','bitstoreal',
  78              'bitstoshortreal','cast','ceil','changed','changed_gclk',
  79              'changing_gclk','clog2','cos','cosh','countones','coverage_control',
  80              'coverage_get','coverage_get_max','coverage_merge','coverage_save',
  81              'dimensions','display','displayb','displayh','displayo',
  82              'dist_chi_square','dist_erlang','dist_exponential','dist_normal',
  83              'dist_poisson','dist_t','dist_uniform','dumpall','dumpfile',
  84              'dumpflush','dumplimit','dumpoff','dumpon','dumpports',
  85              'dumpportsall','dumpportsflush','dumpportslimit','dumpportsoff',
  86              'dumpportson','dumpvars','error','exit','exp','falling_gclk',
  87              'fclose','fdisplay','fdisplayb','fdisplayh','fdisplayo','fell',
  88              'fell_gclk','feof','ferror','fflush','fgetc','fgets','finish',
  89              'floor','fmonitor','fmonitorb','fmonitorh','fmonitoro','fopen',
  90              'fread','fscanf','fseek','fstrobe','fstrobeb','fstrobeh','fstrobeo',
  91              'ftell','future_gclk','fwrite','fwriteb','fwriteh','fwriteo',
  92              'get_coverage','high','hypot','increment','info','isunbounded',
  93              'isunknown','itor','left','ln','load_coverage_db','log10','low',
  94              'monitor','monitorb','monitorh','monitoro','monitoroff','monitoron',
  95              'onehot','onehot0','past','past_gclk','pow','printtimescale',
  96              'q_add','q_exam','q_full','q_initialize','q_remove','random',
  97              'readmemb','readmemh','realtime','realtobits','rewind','right',
  98              'rising_gclk','rose','rose_gclk','rtoi','sampled',
  99              'set_coverage_db_name','sformat','sformatf','shortrealtobits',
 100              'signed','sin','sinh','size','sqrt','sscanf','stable','stable_gclk',
 101              'steady_gclk','stime','stop','strobe','strobeb','strobeh','strobeo',
 102              'swrite','swriteb','swriteh','swriteo','sync$and$array',
 103              'sync$and$plane','sync$nand$array','sync$nand$plane',
 104              'sync$nor$array','sync$nor$plane','sync$or$array','sync$or$plane',
 105              'system','tan','tanh','test$plusargs','time','timeformat',
 106              'typename','ungetc','unpacked_dimensions','unsigned',
 107              'value$plusargs','warning','write','writeb','writeh','writememb',
 108              'writememh','writeo',
 109              ),
 110          // compiler directives
 111          2 => array(
 112              '`__FILE__', '`__LINE__', '`begin_keywords', '`case', '`celldefine',
 113              '`endcelldefine', '`default_nettype', '`define', '`default', '`else',
 114              '`elsif', '`end_keywords', '`endfor', '`endif',
 115              '`endprotect', '`endswitch', '`endwhile', '`for', '`format',
 116              '`if', '`ifdef', '`ifndef', '`include', '`let',
 117              '`line', '`nounconnected_drive', '`pragma', '`protect', '`resetall',
 118              '`switch', '`timescale', '`unconnected_drive', '`undef', '`undefineall',
 119              '`while'
 120              ),
 121          // keywords
 122          3 => array(
 123              'assert', 'assume', 'cover', 'expect', 'disable',
 124              'iff', 'binsof', 'intersect', 'first_match', 'throughout',
 125              'within', 'coverpoint', 'cross', 'wildcard', 'bins',
 126              'ignore_bins', 'illegal_bins', 'genvar', 'if', 'else',
 127              'unique', 'priority', 'matches', 'default', 'forever',
 128              'repeat', 'while', 'for', 'do', 'foreach',
 129              'break', 'continue', 'return', 'pulsestyle_onevent', 'pulsestyle_ondetect',
 130              'noshowcancelled', 'showcancelled', 'ifnone', 'posedge', 'negedge',
 131              'edge', 'wait', 'wait_order', 'timeunit', 'timeprecision',
 132              's', 'ms', 'us', 'ns',
 133              'ps', 'fs', 'step', 'new', 'extends',
 134              'this', 'super', 'protected', 'local', 'rand',
 135              'randc', 'bind', 'constraint', 'solve', 'before',
 136              'dist', 'inside', 'with', 'virtual', 'extern',
 137              'pure', 'forkjoin', 'design', 'instance', 'cell',
 138              'liblist', 'use', 'library', 'incdir', 'include',
 139              'modport', 'sync_accept_on', 'reject_on', 'accept_on',
 140              'sync_reject_on', 'restrict', 'let', 'until', 'until_with',
 141              'unique0', 'eventually', 's_until', 's_always', 's_eventually',
 142              's_nexttime', 's_until_with', 'global', 'untyped', 'implies',
 143              'weak', 'strong', 'nexttime'
 144              ),
 145          // block keywords
 146          4 => array(
 147              'begin', 'end', 'package', 'endpackage', 'macromodule',
 148              'module', 'endmodule', 'generate', 'endgenerate', 'program',
 149              'endprogram', 'class', 'endclass', 'function', 'endfunction',
 150              'case', 'casex', 'casez', 'randcase', 'endcase',
 151              'interface', 'endinterface', 'clocking', 'endclocking', 'task',
 152              'endtask', 'primitive', 'endprimitive', 'fork', 'join',
 153              'join_any', 'join_none', 'covergroup', 'endgroup', 'checker',
 154              'endchecker', 'property', 'endproperty', 'randsequence', 'sequence',
 155              'endsequence', 'specify', 'endspecify', 'config', 'endconfig',
 156              'table', 'endtable', 'initial', 'final', 'always',
 157              'always_comb', 'always_ff', 'always_latch', 'alias', 'assign',
 158              'force', 'release'
 159              ),
 160  
 161          // types
 162          5 => array(
 163              'parameter', 'localparam', 'specparam', 'input', 'output',
 164              'inout', 'ref', 'byte', 'shortint', 'int',
 165              'integer', 'longint', 'time', 'bit', 'logic',
 166              'reg', 'supply0', 'supply1', 'tri', 'triand',
 167              'trior', 'trireg', 'tri0', 'tri1', 'wire',
 168              'uwire', 'wand', 'wor', 'signed', 'unsigned',
 169              'shortreal', 'real', 'realtime', 'type', 'void',
 170              'struct', 'union', 'tagged', 'const', 'var',
 171              'automatic', 'static', 'packed', 'vectored', 'scalared',
 172              'typedef', 'enum', 'string', 'chandle', 'event',
 173              'null', 'pullup', 'pulldown', 'cmos', 'rcmos',
 174              'nmos', 'pmos', 'rnmos', 'rpmos', 'and',
 175              'nand', 'or', 'nor', 'xor', 'xnor',
 176              'not', 'buf', 'tran', 'rtran', 'tranif0',
 177              'tranif1', 'rtranif0', 'rtranif1', 'bufif0', 'bufif1',
 178              'notif0', 'notif1', 'strong0', 'strong1', 'pull0',
 179              'pull1', 'weak0', 'weak1', 'highz0', 'highz1',
 180              'small', 'medium', 'large'
 181              ),
 182  
 183          // DPI
 184          6 => array(
 185              'DPI', 'DPI-C', 'import', 'export', 'context'
 186              ),
 187  
 188          // stdlib
 189          7 => array(
 190              'randomize', 'mailbox', 'semaphore', 'put', 'get',
 191              'try_put', 'try_get', 'peek', 'try_peek', 'process',
 192              'state', 'self', 'status', 'kill', 'await',
 193              'suspend', 'resume', 'size', 'delete', 'insert',
 194              'num', 'first', 'last', 'next', 'prev',
 195              'pop_front', 'pop_back', 'push_front', 'push_back', 'find',
 196              'find_index', 'find_first', 'find_last', 'find_last_index', 'min',
 197              'max', 'unique_index', 'reverse', 'sort', 'rsort',
 198              'shuffle', 'sum', 'product', 'List', 'List_Iterator',
 199              'neq', 'eq', 'data', 'empty', 'front',
 200              'back', 'start', 'finish', 'insert_range', 'erase',
 201              'erase_range', 'set', 'swap', 'clear', 'purge'
 202              ),
 203  
 204          // key_deprecated
 205          8 => array(
 206              'defparam', 'deassign', 'TODO'
 207          ),
 208  
 209          ),
 210      'SYMBOLS' => array(
 211              '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%',
 212              '^', '&', '|', '~',
 213              '?', ':',
 214              '#', '<<', '<<<',
 215              '>', '<', '>=', '<=',
 216              '@', ';', ','
 217          ),
 218      'CASE_SENSITIVE' => array(
 219          GESHI_COMMENTS => false,
 220          1 => true,
 221          2 => true,
 222          3 => true,
 223          4 => true,
 224          5 => true,
 225          6 => true,
 226          7 => true,
 227          8 => true
 228          ),
 229      'STYLES' => array(
 230          'KEYWORDS' => array(
 231              1 => 'color: #996666; font-weight: bold;',
 232              2 => 'color: #336600; font-weight: bold;',
 233              3 => 'color: #996600; font-weight: bold;',
 234              4 => 'color: #000033; font-weight: bold;',
 235              5 => 'color: #330033; font-weight: bold;',
 236              6 => 'color: #996600; font-weight: bold;',
 237              7 => 'color: #CC9900; font-weight: bold;',
 238              8 => 'color: #990000; font-weight: bold;'
 239              ),
 240          'COMMENTS' => array(
 241              1 => 'color: #00008B; font-style: italic;',
 242              'MULTI' => 'color: #00008B; font-style: italic;'
 243              ),
 244          'ESCAPE_CHAR' => array(
 245              0 => 'color: #9F79EE'
 246              ),
 247          'BRACKETS' => array(
 248              0 => 'color: #9F79EE;'
 249              ),
 250          'STRINGS' => array(
 251              0 => 'color: #FF00FF;'
 252              ),
 253          'NUMBERS' => array(
 254              0 => 'color: #ff0055;'
 255              ),
 256          'METHODS' => array(
 257              1 => 'color: #202020;',
 258              2 => 'color: #202020;'
 259              ),
 260          'SYMBOLS' => array(
 261              0 => 'color: #5D478B;'
 262              ),
 263          'REGEXPS' => array(
 264              0 => 'color: #ff0055;',
 265              1 => 'color: #ff0055;',
 266              2 => 'color: #ff0055;',
 267              3 => 'color: #ff0055;'
 268              ),
 269          'SCRIPT' => array(
 270              0 => '',
 271              1 => '',
 272              2 => '',
 273              3 => ''
 274              )
 275          ),
 276      'URLS' => array(
 277          1 => '',
 278          2 => '',
 279          3 => '',
 280          4 => '',
 281          5 => '',
 282          6 => '',
 283          7 => '',
 284          8 => ''
 285          ),
 286      'OOLANG' => false,
 287      'OBJECT_SPLITTERS' => array(
 288          1 => ''
 289          ),
 290      'REGEXPS' => array(
 291          // integer
 292          0 => "\d'[bdh][0-9_a-fA-FxXzZ]+",
 293          // realtime
 294          1 => "\d*\.\d+[munpf]?s",
 295          // time s, ms, us, ns, ps, of fs
 296          2 => "\d+[munpf]?s",
 297          // real
 298          3 => "\d*\.\d+"
 299          ),
 300      'STRICT_MODE_APPLIES' => GESHI_NEVER,
 301      'SCRIPT_DELIMITERS' => array(
 302          0 => ''
 303          ),
 304      'HIGHLIGHT_STRICT_BLOCK' => array(
 305          0 => true
 306          ),
 307      'TAB_WIDTH' => 3,
 308      'PARSER_CONTROL' => array(
 309          'KEYWORDS' => array(
 310              1 => array(
 311                  'DISALLOWED_BEFORE' => '(?<=$)'
 312                  )
 313              )
 314          )
 315  );