KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

verilog.php 5.9KB

11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173
  1. <?php
  2. /**
  3. * verilog.php
  4. * -----------
  5. * Author: G�nter Dannoritzer <dannoritzer@web.de>
  6. * Copyright: (C) 2008 Guenter Dannoritzer
  7. * Release Version: 1.0.8.11
  8. * Date Started: 2008/05/28
  9. *
  10. * Verilog language file for GeSHi.
  11. *
  12. * CHANGES
  13. * -------
  14. * 2008/05/29
  15. * - added regular expression to find numbers of the form 4'b001xz
  16. * - added regular expression to find values for `timescale command
  17. * - extended macro keywords
  18. *
  19. * TODO (updated 2008/05/29)
  20. * -------------------------
  21. *
  22. *************************************************************************************
  23. *
  24. * This file is part of GeSHi.
  25. *
  26. * GeSHi is free software; you can redistribute it and/or modify
  27. * it under the terms of the GNU General Public License as published by
  28. * the Free Software Foundation; either version 2 of the License, or
  29. * (at your option) any later version.
  30. *
  31. * GeSHi is distributed in the hope that it will be useful,
  32. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  33. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  34. * GNU General Public License for more details.
  35. *
  36. * You should have received a copy of the GNU General Public License
  37. * along with GeSHi; if not, write to the Free Software
  38. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  39. *
  40. ************************************************************************************/
  41. $language_data = array (
  42. 'LANG_NAME' => 'Verilog',
  43. 'COMMENT_SINGLE' => array(1 => '//'),
  44. 'COMMENT_MULTI' => array('/*' => '*/'),
  45. 'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
  46. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  47. 'QUOTEMARKS' => array('"'),
  48. 'ESCAPE_CHAR' => '\\',
  49. 'KEYWORDS' => array(
  50. // keywords
  51. 1 => array('always', 'and', 'assign', 'begin', 'buf', 'bufif0', 'bufif1', 'case',
  52. 'casex', 'casez', 'cmos', 'deassign', 'default', 'defparam',
  53. 'disable', 'edge', 'else', 'end', 'endcase', 'endfunction',
  54. 'endmodule', 'endprimitive', 'endspecify', 'endtable', 'endtask',
  55. 'event', 'fork', 'for', 'force', 'forever', 'function', 'highz0',
  56. 'highz1', 'if', 'ifnone', 'initial', 'inout', 'input', 'integer',
  57. 'join', 'large', 'macromodule', 'medium', 'module', 'nand',
  58. 'negedge', 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or',
  59. 'output', 'parameter', 'pmos', 'posedge', 'primitive', 'pull0',
  60. 'pull1', 'pulldown', 'pullup', 'rcmos', 'real', 'realtime', 'reg',
  61. 'release', 'repeat', 'rnmos', 'rpmos', 'rtran', 'rtranif0',
  62. 'rtranif1', 'scalared', 'small', 'specify', 'specparam',
  63. 'strong0', 'strong1', 'supply0', 'supply1', 'table', 'task',
  64. 'time', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0', 'tri1',
  65. 'triand', 'trior', 'trireg', 'vectored', 'wait', 'wand', 'weak0',
  66. 'weak1', 'while', 'wire', 'wor', 'xnor', 'xor'
  67. ),
  68. // system tasks
  69. 2 => array(
  70. '$display', '$monitor',
  71. '$dumpall', '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff',
  72. '$dumpon', '$dumpvars',
  73. '$fclose', '$fdisplay', '$fopen',
  74. '$finish', '$fmonitor', '$fstrobe', '$fwrite',
  75. '$fgetc', '$ungetc', '$fgets', '$fscanf', '$fread', '$ftell',
  76. '$fseek', '$frewind', '$ferror', '$fflush', '$feof',
  77. '$random',
  78. '$readmemb', '$readmemh', '$readmemx',
  79. '$signed', '$stime', '$stop',
  80. '$strobe', '$time', '$unsigned', '$write'
  81. ),
  82. // macros
  83. 3 => array(
  84. '`default-net', '`define',
  85. '`celldefine', '`default_nettype', '`else', '`elsif', '`endcelldefine',
  86. '`endif', '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive',
  87. '`resetall', '`timescale', '`unconnected_drive', '`undef'
  88. ),
  89. ),
  90. 'SYMBOLS' => array(
  91. '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%',
  92. '^', '&', '|', '~',
  93. '?', ':',
  94. '#', '<<', '<<<',
  95. '>', '<', '>=', '<=',
  96. '@', ';', ','
  97. ),
  98. 'CASE_SENSITIVE' => array(
  99. GESHI_COMMENTS => false,
  100. 1 => false,
  101. 2 => false,
  102. 3 => false
  103. ),
  104. 'STYLES' => array(
  105. 'KEYWORDS' => array(
  106. 1 => 'color: #A52A2A; font-weight: bold;',
  107. 2 => 'color: #9932CC;',
  108. 3 => 'color: #008800;'
  109. ),
  110. 'COMMENTS' => array(
  111. 1 => 'color: #00008B; font-style: italic;',
  112. 'MULTI' => 'color: #00008B; font-style: italic;'
  113. ),
  114. 'ESCAPE_CHAR' => array(
  115. 0 => 'color: #9F79EE'
  116. ),
  117. 'BRACKETS' => array(
  118. 0 => 'color: #9F79EE;'
  119. ),
  120. 'STRINGS' => array(
  121. 0 => 'color: #FF00FF;'
  122. ),
  123. 'NUMBERS' => array(
  124. 0 => 'color: #ff0055;'
  125. ),
  126. 'METHODS' => array(
  127. 1 => 'color: #202020;',
  128. 2 => 'color: #202020;'
  129. ),
  130. 'SYMBOLS' => array(
  131. 0 => 'color: #5D478B;'
  132. ),
  133. 'REGEXPS' => array(
  134. 0 => 'color: #ff0055;',
  135. 1 => 'color: #ff0055;',
  136. ),
  137. 'SCRIPT' => array(
  138. 0 => '',
  139. 1 => '',
  140. 2 => '',
  141. 3 => ''
  142. )
  143. ),
  144. 'URLS' => array(
  145. 1 => '',
  146. 2 => '',
  147. 3 => ''
  148. ),
  149. 'OOLANG' => false,
  150. 'OBJECT_SPLITTERS' => array(
  151. 1 => ''
  152. ),
  153. 'REGEXPS' => array(
  154. // numbers
  155. 0 => "\d'[bdh][0-9_a-fA-FxXzZ]+",
  156. // time -> 1, 10, or 100; s, ms, us, ns, ps, of fs
  157. 1 => "1[0]{0,2}[munpf]?s"
  158. ),
  159. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  160. 'SCRIPT_DELIMITERS' => array(
  161. 1 => ''
  162. ),
  163. 'HIGHLIGHT_STRICT_BLOCK' => array(
  164. 0 => true,
  165. 1 => true,
  166. 2 => true,
  167. 3 => true
  168. ),
  169. 'TAB_WIDTH' => 4
  170. );
  171. ?>