ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
vhdl.php
Go to the documentation of this file.
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.12
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
51 'LANG_NAME' => 'VHDL',
52 'COMMENT_SINGLE' => array(1 => '--'),
53 'COMMENT_MULTI' => array('/*' => '*/'),
54 'COMMENT_REGEXP' => array(
55 // PSL adds C-preprocessor support
56 1 => '/(?<=\s)#(?:\\\\\\\\|\\\\\\n|.)*$/m',
57 // PSL metacomments (single-line only for now)
58 2 => '/--\s*@?psl(?:.)*?;$/m',
59 ),
60 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
61 'QUOTEMARKS' => array('"'),
62 'ESCAPE_CHAR' => '',
63 'KEYWORDS' => array(
64 /*keywords*/
65 1 => array(
66 'access','after','alias','all','attribute','architecture','array','begin',
67 'block','body','buffer','bus','case','case?','component','configuration','constant','context',
68 'disconnect','downto','else','elsif','end','entity','exit','file','for','force',
69 'function','generate','generic','group','guarded','if','impure','in',
70 'inertial','inout','is','label','library','linkage','literal','loop',
71 'map','new','next','null','of','on','open','others','out','package',
72 'port','postponed','procedure','process','protected','pure','range','record','register',
73 'reject','release','report','return','select','severity','shared','signal','subtype',
74 'then','to','transport','type','unaffected','units','until','use','variable',
75 'wait','when','while','with'
76 ),
77 /*types and standard libs*/
78 2 => array(
79 'bit','bit_vector','character','boolean','integer','real','time','delay_length','string',
80 'severity_level','positive','natural','signed','unsigned','line','text',
81 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector',
82 'sfixed','ufixed','float','float32','float64','float128',
83 'work','ieee','std_logic_1164','math_real','math_complex','textio',
84 'numeric_std','numeric_std_signed','numeric_std_unsigned','numeric_bit'
85 ),
86 /*operators*/
87 3 => array(
88 'abs','and','mod','nor','not','or','rem','rol','ror','sla','sll','sra','srl','xnor','xor'
89 ),
90 /*psl*/
91 4 => array(
92 'assert','assume','assume_guarantee','clock','const','countones','cover','default',
93 'endpoint','fairness','fell','forall','inf','inherit','isunknown','onehot','onehot0','property',
94 'prev','restrict','restrict_guarantee','rose','sequence','stable','strong','union','vmode','vprop','vunit'
95 ),
96 /*psl operators*/
97 5 => array(
98 'abort','always','before','before!','before!_','before_','eventually!','never',
99 'next!','next_a','next_a!','next_e','next_e!','next_event','next_event!','next_event_a','next_event_a!',
100 'next_event_e','next_event_e!','until!','until!_','until_','within'
101 )
102 ),
103 'SYMBOLS' => array(
104 '[', ']', '(', ')',
105 ';',':',
106 '<','>','=','+','-','*','/','&','|','?'
107 ),
108 'CASE_SENSITIVE' => array(
109 GESHI_COMMENTS => false,
110 1 => false,
111 2 => false,
112 3 => false,
113 4 => false,
114 5 => false
115 ),
116 'STYLES' => array(
117 'KEYWORDS' => array(
118 1 => 'color: #000080; font-weight: bold;',
119 2 => 'color: #0000ff;',
120 3 => 'color: #000066;',
121 4 => 'color: #000080; font-weight: bold;',
122 5 => 'color: #000066;'
123 ),
124 'COMMENTS' => array(
125 1 => 'color: #008000; font-style: italic;',
126 2 => 'color: #ff0000; font-weight: bold;',
127 'MULTI' => 'color: #008000; font-style: italic;'
128 ),
129 'ESCAPE_CHAR' => array(
130 0 => 'color: #000099; font-weight: bold;'
131 ),
132 'BRACKETS' => array(
133 0 => 'color: #000066;'
134 ),
135 'STRINGS' => array(
136 0 => 'color: #7f007f;'
137 ),
138 'NUMBERS' => array(
139 0 => 'color: #ff0000;'
140 ),
141 'METHODS' => array(
142 ),
143 'SYMBOLS' => array(
144 0 => 'color: #000066;'
145 ),
146 'REGEXPS' => array(
147 0 => 'color: #ff0000;',
148 //1 => 'color: #ff0000;',
149 2 => 'color: #ee82ee;'
150 ),
151 'SCRIPT' => array(
152 )
153 ),
154 'URLS' => array(
155 1 => '',
156 2 => '',
157 3 => '',
158 4 => '',
159 5 => ''
160 ),
161 'OOLANG' => false,
162 'OBJECT_SPLITTERS' => array(
163 ),
164 'REGEXPS' => array(
165 //Based literals, scientific notation, and time units
166 0 => '(\b\d+#[[:xdigit:]_]+#)|'.
167 '(\b[\d_]+(\.[\d_]+)?[eE][+\-]?[\d_]+)|'.
168 '(\b(hr|min|sec|ms|us|ns|ps|fs)\b)',
169 //Character literals
170 /* GeSHi won't match this pattern for some reason and QUOTEMARKS
171 * can't be used because it interferes with attribute parsing */
172 /*1 => "\b'.'\b",*/
173 //Attributes
174 2 => "'\w+(?!')"
175 ),
176 'STRICT_MODE_APPLIES' => GESHI_NEVER,
177 'SCRIPT_DELIMITERS' => array(
178 ),
179 'HIGHLIGHT_STRICT_BLOCK' => array(
180 )
181);
An exception for terminatinating execution or to throw for unit testing.
const GESHI_CAPS_NO_CHANGE
Lowercase keywords found.
Definition: geshi.php:95
const GESHI_COMMENTS
Used in language files to mark comments.
Definition: geshi.php:150
const GESHI_NEVER
#+ @access private
Definition: geshi.php:124
$language_data
Definition: vhdl.php:50