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.3
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
42$language_data = array (
43    'LANG_NAME' => 'Verilog',
44    'COMMENT_SINGLE' => array(1 => '//'),
45    'COMMENT_MULTI' => array('/*' => '*/'),
46    'COMMENT_REGEXP' => array(1 => '/\/\/(?:\\\\\\\\|\\\\\\n|.)*$/m'),
47    'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE,
48    'QUOTEMARKS' => array('"'),
49    'ESCAPE_CHAR' => '\\',
50    'KEYWORDS' => array(
51        // keywords
52        1 => array('always', 'and', 'assign', 'begin', 'buf', 'bufif0', 'bufif1', 'case',
53            'casex', 'casez', 'cmos', 'deassign', 'default', 'defparam',
54            'disable', 'edge', 'else', 'end', 'endcase', 'endfunction',
55            'endmodule', 'endprimitive', 'endspecify', 'endtable', 'endtask',
56            'event', 'for', 'force', 'forever', 'function', 'highz0',
57            'highz1', 'if', 'ifnone', 'initial', 'inout', 'input', 'integer',
58            'join', 'large', 'macromodule', 'medium', 'module', 'nand',
59            'negedge', 'nmos', 'nor', 'not', 'notif0', 'notif1', 'or',
60            'output', 'parameter', 'pmos', 'posedge', 'primitive', 'pull0',
61            'pull1', 'pulldown', 'pullup', 'rcmos', 'real', 'realtime', 'reg',
62            'release', 'repeat', 'rnmos', 'rpmos', 'rtran', 'rtranif0',
63            'rtranif1', 'scalared', 'small', 'specify', 'specparam',
64            'strong0', 'strong1', 'supply0', 'supply1', 'table', 'task',
65            'time', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0', 'tri1',
66            'triand', 'trior', 'trireg', 'vectored', 'wait', 'wand', 'weak0',
67            'weak1', 'while', 'wire', 'wor', 'xnor', 'xor'
68            ),
69        // system tasks
70        2 => array(
71            '$display', '$monitor',
72            '$dumpall', '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff',
73            '$dumpon', '$dumpvars',
74            '$fclose', '$fdisplay', '$fopen',
75            '$finish', '$fmonitor', '$fstrobe', '$fwrite',
76            '$fgetc', '$ungetc', '$fgets', '$fscanf', '$fread', '$ftell',
77            '$fseek', '$frewind', '$ferror', '$fflush', '$feof',
78            '$random',
79            '$readmemb', '$readmemh', '$readmemx',
80            '$signed', '$stime', '$stop',
81            '$strobe', '$time', '$unsigned', '$write'
82            ),
83        // macros
84        3 => array(
85            '`default-net', '`define',
86            '`celldefine', '`default_nettype', '`else', '`elsif', '`endcelldefine',
87            '`endif', '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive',
88            '`resetall', '`timescale', '`unconnected_drive', '`undef'
89            ),
90        ),
91    'SYMBOLS' => array(
92        '(', ')', '{', '}', '[', ']', '=', '+', '-', '*', '/', '!', '%',
93        '^', '&', '|', '~',
94        '?', ':',
95        '#', '<<', '<<<',
96        '>', '<', '>=', '<=',
97        '@', ';', ','
98        ),
99    'CASE_SENSITIVE' => array(
100        GESHI_COMMENTS => false,
101        1 => false,
102        2 => false,
103        3 => false
104        ),
105    'STYLES' => array(
106        'KEYWORDS' => array(
107            1 => 'color: #A52A2A; font-weight: bold;',
108            2 => 'color: #9932CC;',
109            3 => 'color: #008800;'
110            ),
111        'COMMENTS' => array(
112            1 => 'color: #00008B; font-style: italic;',
113            'MULTI' => 'color: #00008B; font-style: italic;'
114            ),
115        'ESCAPE_CHAR' => array(
116            0 => 'color: #9F79EE'
117            ),
118        'BRACKETS' => array(
119            0 => 'color: #9F79EE;'
120            ),
121        'STRINGS' => array(
122            0 => 'color: #FF00FF;'
123            ),
124        'NUMBERS' => array(
125            0 => 'color: #ff0055;'
126            ),
127        'METHODS' => array(
128            1 => 'color: #202020;',
129            2 => 'color: #202020;'
130            ),
131        'SYMBOLS' => array(
132            0 => 'color: #5D478B;'
133            ),
134        'REGEXPS' => array(
135            0 => 'color: #ff0055;',
136            1 => 'color: #ff0055;',
137            ),
138        'SCRIPT' => array(
139            0 => '',
140            1 => '',
141            2 => '',
142            3 => ''
143            )
144        ),
145    'URLS' => array(
146        1 => '',
147        2 => '',
148        3 => ''
149        ),
150    'OOLANG' => false,
151    'OBJECT_SPLITTERS' => array(
152        1 => ''
153        ),
154    'REGEXPS' => array(
155        // numbers
156        0 => "\d'[bdh][0-9_a-fA-FxXzZ]+",
157        // time -> 1, 10, or 100; s, ms, us, ns, ps, of fs
158        1 => "1[0]{0,2}[munpf]?s"
159        ),
160    'STRICT_MODE_APPLIES' => GESHI_NEVER,
161    'SCRIPT_DELIMITERS' => array(
162        1 => ''
163        ),
164    'HIGHLIGHT_STRICT_BLOCK' => array(
165        0 => true,
166        1 => true,
167        2 => true,
168        3 => true
169        ),
170    'TAB_WIDTH' => 4
171);
172
173?>
174