diff options
author | Andreas Gohr <andi@splitbrain.org> | 2012-11-08 23:15:08 +0100 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2012-11-08 23:15:08 +0100 |
commit | 04924b7a9d090c0814cfff3e6706263e4d5a46e8 (patch) | |
tree | d83fc6b5683fbc9c639bfd1832f96dca2f3c8646 /inc/geshi/vhdl.php | |
parent | 1ea7a6bada66fc9b7a45f61b4892e4ea23196d89 (diff) | |
parent | a731ed1d6736ca405b3559adfd9500affcc59412 (diff) | |
download | rpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.gz rpg-04924b7a9d090c0814cfff3e6706263e4d5a46e8.tar.bz2 |
Merge branch 'master' into proxyconnect
* master: (169 commits)
added PCRE UTF-8 checks to do=check FS#2636
avoid multiple paralell update checks
fix regression bug in HTTPClient FS#2621
changed PAGEUTILS_ID_HIDEPAGE to has BEFORE/AFTER
TarLib code cleanup
TarLib: fixed appending in non-dynamic mode
fixed third method of adding files in TarLib
fix lone zero block in TarLib created archives
fix use of constructor in TarLib
Slovak language update
Korean language update
Latvian language update
added event PAGEUTILS_ID_HIDEPAGE
added test for isHiddenPage()
removed redundant variables in tpl_include_page() (because of 3ff8773b)
added cut off points for mobile devices as parameters to style.ini
Corrected typo: ruke -> rule
Persian language update
Spanish language update
russian language update
...
Diffstat (limited to 'inc/geshi/vhdl.php')
-rw-r--r-- | inc/geshi/vhdl.php | 105 |
1 files changed, 72 insertions, 33 deletions
diff --git a/inc/geshi/vhdl.php b/inc/geshi/vhdl.php index f6ce941d4..a8f37e676 100644 --- a/inc/geshi/vhdl.php +++ b/inc/geshi/vhdl.php @@ -3,14 +3,21 @@ * vhdl.php * -------- * Author: Alexander 'E-Razor' Krause (admin@erazor-zone.de) + * Contributors: + * - Kevin Thibedeau (kevinpt@yahoo.com) * Copyright: (c) 2005 Alexander Krause - * Release Version: 1.0.8.10 + * Release Version: 1.0.8.11 * Date Started: 2005/06/15 * * VHDL (VHSICADL, very high speed integrated circuit HDL) language file for GeSHi. * * CHANGES * ------- + * 2012/4/30 (1.0.8.10) + * - Reworked to support new features of VHDL-2008. + * - Changes include: multi-line comments, all new keywords, PSL keywords and metacomments, + * - based literals, attribute highlighting, preprocessor macros (from PSL), and other small + * - improvements. * 2008/05/23 (1.0.7.22) * - Added description of extra language features (SF#1970248) * - Optimized regexp group 0 somewhat @@ -43,56 +50,80 @@ $language_data = array ( 'LANG_NAME' => 'VHDL', 'COMMENT_SINGLE' => array(1 => '--'), - 'COMMENT_MULTI' => array('%' => '%'), + 'COMMENT_MULTI' => array('/*' => '*/'), + 'COMMENT_REGEXP' => array( + // PSL adds C-preprocessor support + 1 => '/(?<=\s)#(?:\\\\\\\\|\\\\\\n|.)*$/m', + // PSL metacomments (single-line only for now) + 2 => '/--\s*@?psl(?:.)*?;$/m', + ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array('"'), 'ESCAPE_CHAR' => '', 'KEYWORDS' => array( /*keywords*/ 1 => array( - 'access','after','alias','all','assert','attribute','architecture','begin', - 'block','body','buffer','bus','case','component','configuration','constant', - 'disconnect','downto','else','elsif','end','entity','exit','file','for', + 'access','after','alias','all','attribute','architecture','array','begin', + 'block','body','buffer','bus','case','case?','component','configuration','constant','context', + 'disconnect','downto','else','elsif','end','entity','exit','file','for','force', 'function','generate','generic','group','guarded','if','impure','in', 'inertial','inout','is','label','library','linkage','literal','loop', 'map','new','next','null','of','on','open','others','out','package', - 'port','postponed','procedure','process','pure','range','record','register', - 'reject','report','return','select','severity','signal','shared','subtype', + 'port','postponed','procedure','process','protected','pure','range','record','register', + 'reject','release','report','return','select','severity','shared','signal','subtype', 'then','to','transport','type','unaffected','units','until','use','variable', - 'wait','when','while','with','note','warning','error','failure','and', - 'or','xor','not','nor','used','memory','segments','dff','dffe','help_id', - 'mod','info','latch','rising_edge','falling_edge' - ), - /*types*/ + 'wait','when','while','with' + ), + /*types and standard libs*/ 2 => array( - 'bit','bit_vector','character','boolean','integer','real','time','string', + 'bit','bit_vector','character','boolean','integer','real','time','delay_length','string', 'severity_level','positive','natural','signed','unsigned','line','text', - 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector','qsim_state', - 'qsim_state_vector','qsim_12state','qsim_12state_vector','qsim_strength', - 'mux_bit','mux_vector','reg_bit','reg_vector','wor_bit','wor_vector', - 'work','ieee','std_logic_signed','std_logic_1164','std_logic_arith', - 'numeric_std' - - ), + 'std_logic','std_logic_vector','std_ulogic','std_ulogic_vector', + 'sfixed','ufixed','float','float32','float64','float128', + 'work','ieee','std_logic_1164','math_real','math_complex','textio', + 'numeric_std','numeric_std_signed','numeric_std_unsigned','numeric_bit' + ), /*operators*/ - ), + 3 => array( + 'abs','and','mod','nor','not','or','rem','rol','ror','sla','sll','sra','srl','xnor','xor' + ), + /*psl*/ + 4 => array( + 'assert','assume','assume_guarantee','clock','const','countones','cover','default', + 'endpoint','fairness','fell','forall','inf','inherit','isunknown','onehot','onehot0','property', + 'prev','restrict','restrict_guarantee','rose','sequence','stable','strong','union','vmode','vprop','vunit' + ), + /*psl operators*/ + 5 => array( + 'abort','always','before','before!','before!_','before_','eventually!','never', + 'next!','next_a','next_a!','next_e','next_e!','next_event','next_event!','next_event_a','next_event_a!', + 'next_event_e','next_event_e!','until!','until!_','until_','within' + ) + ), 'SYMBOLS' => array( '[', ']', '(', ')', ';',':', - '<','>','=','<=',':=','=>','==' + '<','>','=','+','-','*','/','&','|','?' ), 'CASE_SENSITIVE' => array( GESHI_COMMENTS => false, 1 => false, - 2 => false + 2 => false, + 3 => false, + 4 => false, + 5 => false ), 'STYLES' => array( 'KEYWORDS' => array( 1 => 'color: #000080; font-weight: bold;', - 2 => 'color: #0000ff;' + 2 => 'color: #0000ff;', + 3 => 'color: #000066;', + 4 => 'color: #000080; font-weight: bold;', + 5 => 'color: #000066;' ), 'COMMENTS' => array( 1 => 'color: #008000; font-style: italic;', + 2 => 'color: #ff0000; font-weight: bold;', 'MULTI' => 'color: #008000; font-style: italic;' ), 'ESCAPE_CHAR' => array( @@ -114,25 +145,33 @@ $language_data = array ( ), 'REGEXPS' => array( 0 => 'color: #ff0000;', - 1 => 'color: #ff0000;' + //1 => 'color: #ff0000;', + 2 => 'color: #ee82ee;' ), 'SCRIPT' => array( ) ), 'URLS' => array( 1 => '', - 2 => '' - ), + 2 => '', + 3 => '', + 4 => '', + 5 => '' + ), 'OOLANG' => false, 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( - //Hex numbers and scientific notation for numbers - 0 => '(\b0x[0-9a-fA-F]+|\b\d[0-9a-fA-F]+[hH])|'. - '(\b\d+?(\.\d+?)?E[+\-]?\d+)|(\bns)|'. - "('[0-9a-zA-Z]+(?!'))", - //Number characters? - 1 => "\b(''\d'')" + //Based literals, scientific notation, and time units + 0 => '(\b\d+#[[:xdigit:]_]+#)|'. + '(\b[\d_]+(\.[\d_]+)?[eE][+\-]?[\d_]+)|'. + '(\b(hr|min|sec|ms|us|ns|ps|fs)\b)', + //Character literals + /* GeSHi won't match this pattern for some reason and QUOTEMARKS + * can't be used because it interferes with attribute parsing */ + /*1 => "\b'.'\b",*/ + //Attributes + 2 => "'\w+(?!')" ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array( |