]>
luflow.net public git repositories - flow-web.git/blob - static/highlight/languages/verilog.js
1 /*! `verilog` grammar compiled for Highlight.js 11.11.1 */
3 var hljsGrammar
= ( function () {
8 Author: Jon Evans <jon@craftyjon.com>
9 Contributors: Boone Severson <boone.severson@gmail.com>
10 Description: Verilog is a hardware description language used in electronic design automation to describe digital and mixed-signal systems. This highlighter supports Verilog and SystemVerilog through IEEE 1800-2012.
11 Website: http://www.verilog.com
15 function verilog ( hljs
) {
16 const regex
= hljs
. regex
;
18 $ pattern : /\$?[\w]+(\$[\w]+)*/ ,
172 "pulsestyle_ondetect" ,
173 "pulsestyle_onevent" ,
296 "$assertnonvacuouson" ,
314 "$set_coverage_db_name" ,
329 "$unpacked_dimensions" ,
471 const BUILT_IN_CONSTANTS
= [
479 "default_decay_time" ,
480 "default_trireg_strength" ,
482 "delay_mode_distributed" ,
495 "nounconnected_drive" ,
511 case_insensitive : false ,
514 hljs
. C_BLOCK_COMMENT_MODE
,
515 hljs
. C_LINE_COMMENT_MODE
,
516 hljs
. QUOTE_STRING_MODE
,
519 contains : [ hljs
. BACKSLASH_ESCAPE
],
521 { begin : /\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/ },
522 { begin : /\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/ },
524 begin : /\b[0-9][0-9_]*/ ,
529 /* parameters to instances */
533 { begin : '# \\ ((?!parameter).+ \\ )' },
541 scope : 'variable.constant' ,
542 match : regex
. concat (/ `/, regex.either(...BUILT_IN_CONSTANTS)),
546 begin: regex.concat(/` /, regex
. either (... DIRECTIVES
)),
559 hljs
. registerLanguage ( 'verilog' , hljsGrammar
);