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.

184 lines
6.9KB

  1. <?php
  2. /*************************************************************************************
  3. * vhdl.php
  4. * --------
  5. * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de)
  6. * Contributors:
  7. * - Kevin Thibedeau (kevinpt@yahoo.com)
  8. * Copyright: (c) 2005 Alexander Krause
  9. * Release Version: 1.0.8.11
  10. * Date Started: 2005/06/15
  11. *
  12. * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi.
  13. *
  14. * CHANGES
  15. * -------
  16. * 2012/4/30 (1.0.8.10)
  17. * - Reworked to support new features of VHDL-2008.
  18. * - Changes include: multi-line comments, all new keywords, PSL keywords and metacomments,
  19. * - based literals, attribute highlighting, preprocessor macros (from PSL), and other small
  20. * - improvements.
  21. * 2008/05/23 (1.0.7.22)
  22. * - Added description of extra language features (SF#1970248)
  23. * - Optimized regexp group 0 somewhat
  24. * 2006/06/15 (1.0.0)
  25. * - First Release
  26. *
  27. * TODO
  28. * ----
  29. *
  30. *************************************************************************************
  31. *
  32. * This file is part of GeSHi.
  33. *
  34. * GeSHi is free software; you can redistribute it and/or modify
  35. * it under the terms of the GNU General Public License as published by
  36. * the Free Software Foundation; either version 2 of the License, or
  37. * (at your option) any later version.
  38. *
  39. * GeSHi is distributed in the hope that it will be useful,
  40. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  41. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  42. * GNU General Public License for more details.
  43. *
  44. * You should have received a copy of the GNU General Public License
  45. * along with GeSHi; if not, write to the Free Software
  46. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  47. *
  48. ************************************************************************************/
  49. $language_data = array (
  50. 'LANG_NAME' => 'VHDL',
  51. 'COMMENT_SINGLE' => array(1 => '--'),
  52. 'COMMENT_MULTI' => array('/*' => '*/'),
  53. 'COMMENT_REGEXP' => array(
  54. // PSL adds C-preprocessor support
  55. 1 => '/(?<=\s)#(?:\\\\\\\\|\\\\\\n|.)*$/m',
  56. // PSL metacomments (single-line only for now)
  57. 2 => '/--\s*@?psl(?:.)*?;$/m',
  58. ),
  59. 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
  60. 'QUOTEMARKS' => array('"'),
  61. 'ESCAPE_CHAR' => '',
  62. 'KEYWORDS' => array(
  63. /*keywords*/
  64. 1 => array(
  65. 'access','after','alias','all','attribute','architecture','array','begin',
  66. 'block','body','buffer','bus','case','case?','component','configuration','constant','context',
  67. 'disconnect','downto','else','elsif','end','entity','exit','file','for','force',
  68. 'function','generate','generic','group','guarded','if','impure','in',
  69. 'inertial','inout','is','label','library','linkage','literal','loop',
  70. 'map','new','next','null','of','on','open','others','out','package',
  71. 'port','postponed','procedure','process','protected','pure','range','record','register',
  72. 'reject','release','report','return','select','severity','shared','signal','subtype',
  73. 'then','to','transport','type','unaffected','units','until','use','variable',
  74. 'wait','when','while','with'
  75. ),
  76. /*types and standard libs*/
  77. 2 => array(
  78. 'bit','bit_vector','character','boolean','integer','real','time','delay_length','string',
  79. 'severity_level','positive','natural','signed','unsigned','line','text',
  80. 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector',
  81. 'sfixed','ufixed','float','float32','float64','float128',
  82. 'work','ieee','std_logic_1164','math_real','math_complex','textio',
  83. 'numeric_std','numeric_std_signed','numeric_std_unsigned','numeric_bit'
  84. ),
  85. /*operators*/
  86. 3 => array(
  87. 'abs','and','mod','nor','not','or','rem','rol','ror','sla','sll','sra','srl','xnor','xor'
  88. ),
  89. /*psl*/
  90. 4 => array(
  91. 'assert','assume','assume_guarantee','clock','const','countones','cover','default',
  92. 'endpoint','fairness','fell','forall','inf','inherit','isunknown','onehot','onehot0','property',
  93. 'prev','restrict','restrict_guarantee','rose','sequence','stable','strong','union','vmode','vprop','vunit'
  94. ),
  95. /*psl operators*/
  96. 5 => array(
  97. 'abort','always','before','before!','before!_','before_','eventually!','never',
  98. 'next!','next_a','next_a!','next_e','next_e!','next_event','next_event!','next_event_a','next_event_a!',
  99. 'next_event_e','next_event_e!','until!','until!_','until_','within'
  100. )
  101. ),
  102. 'SYMBOLS' => array(
  103. '[', ']', '(', ')',
  104. ';',':',
  105. '<','>','=','+','-','*','/','&','|','?'
  106. ),
  107. 'CASE_SENSITIVE' => array(
  108. GESHI_COMMENTS => false,
  109. 1 => false,
  110. 2 => false,
  111. 3 => false,
  112. 4 => false,
  113. 5 => false
  114. ),
  115. 'STYLES' => array(
  116. 'KEYWORDS' => array(
  117. 1 => 'color: #000080; font-weight: bold;',
  118. 2 => 'color: #0000ff;',
  119. 3 => 'color: #000066;',
  120. 4 => 'color: #000080; font-weight: bold;',
  121. 5 => 'color: #000066;'
  122. ),
  123. 'COMMENTS' => array(
  124. 1 => 'color: #008000; font-style: italic;',
  125. 2 => 'color: #ff0000; font-weight: bold;',
  126. 'MULTI' => 'color: #008000; font-style: italic;'
  127. ),
  128. 'ESCAPE_CHAR' => array(
  129. 0 => 'color: #000099; font-weight: bold;'
  130. ),
  131. 'BRACKETS' => array(
  132. 0 => 'color: #000066;'
  133. ),
  134. 'STRINGS' => array(
  135. 0 => 'color: #7f007f;'
  136. ),
  137. 'NUMBERS' => array(
  138. 0 => 'color: #ff0000;'
  139. ),
  140. 'METHODS' => array(
  141. ),
  142. 'SYMBOLS' => array(
  143. 0 => 'color: #000066;'
  144. ),
  145. 'REGEXPS' => array(
  146. 0 => 'color: #ff0000;',
  147. //1 => 'color: #ff0000;',
  148. 2 => 'color: #ee82ee;'
  149. ),
  150. 'SCRIPT' => array(
  151. )
  152. ),
  153. 'URLS' => array(
  154. 1 => '',
  155. 2 => '',
  156. 3 => '',
  157. 4 => '',
  158. 5 => ''
  159. ),
  160. 'OOLANG' => false,
  161. 'OBJECT_SPLITTERS' => array(
  162. ),
  163. 'REGEXPS' => array(
  164. //Based literals, scientific notation, and time units
  165. 0 => '(\b\d+#[[:xdigit:]_]+#)|'.
  166. '(\b[\d_]+(\.[\d_]+)?[eE][+\-]?[\d_]+)|'.
  167. '(\b(hr|min|sec|ms|us|ns|ps|fs)\b)',
  168. //Character literals
  169. /* GeSHi won't match this pattern for some reason and QUOTEMARKS
  170. * can't be used because it interferes with attribute parsing */
  171. /*1 => "\b'.'\b",*/
  172. //Attributes
  173. 2 => "'\w+(?!')"
  174. ),
  175. 'STRICT_MODE_APPLIES' => GESHI_NEVER,
  176. 'SCRIPT_DELIMITERS' => array(
  177. ),
  178. 'HIGHLIGHT_STRICT_BLOCK' => array(
  179. )
  180. );
  181. ?>