eric6/ThirdParty/Pygments/pygments/lexers/hdl.py

changeset 7547
21b0534faebc
parent 6942
2602857055c5
child 7701
25f42e208e08
--- a/eric6/ThirdParty/Pygments/pygments/lexers/hdl.py	Tue Apr 21 19:44:19 2020 +0200
+++ b/eric6/ThirdParty/Pygments/pygments/lexers/hdl.py	Tue Apr 21 19:47:10 2020 +0200
@@ -5,7 +5,7 @@
 
     Lexers for hardware descriptor languages.
 
-    :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
+    :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS.
     :license: BSD, see LICENSE for details.
 """
 
@@ -131,15 +131,6 @@
         ]
     }
 
-    def get_tokens_unprocessed(self, text):
-        for index, token, value in \
-                RegexLexer.get_tokens_unprocessed(self, text):
-            # Convention: mark all upper case names as constants
-            if token is Name:
-                if value.isupper():
-                    token = Name.Constant
-            yield index, token, value
-
 
 class SystemVerilogLexer(RegexLexer):
     """
@@ -184,63 +175,75 @@
             (r'`[a-zA-Z_]\w*', Name.Constant),
 
             (words((
-                'accept_on', 'alias', 'always', 'always_comb', 'always_ff', 'always_latch',
-                'and', 'assert', 'assign', 'assume', 'automatic', 'before', 'begin', 'bind', 'bins',
-                'binsof', 'bit', 'break', 'buf', 'bufif0', 'bufif1', 'byte', 'case', 'casex', 'casez',
-                'cell', 'chandle', 'checker', 'class', 'clocking', 'cmos', 'config', 'const', 'constraint',
-                'context', 'continue', 'cover', 'covergroup', 'coverpoint', 'cross', 'deassign',
-                'default', 'defparam', 'design', 'disable', 'dist', 'do', 'edge', 'else', 'end', 'endcase',
-                'endchecker', 'endclass', 'endclocking', 'endconfig', 'endfunction', 'endgenerate',
-                'endgroup', 'endinterface', 'endmodule', 'endpackage', 'endprimitive',
-                'endprogram', 'endproperty', 'endsequence', 'endspecify', 'endtable',
-                'endtask', 'enum', 'event', 'eventually', 'expect', 'export', 'extends', 'extern',
-                'final', 'first_match', 'for', 'force', 'foreach', 'forever', 'fork', 'forkjoin',
-                'function', 'generate', 'genvar', 'global', 'highz0', 'highz1', 'if', 'iff', 'ifnone',
-                'ignore_bins', 'illegal_bins', 'implies', 'import', 'incdir', 'include',
-                'initial', 'inout', 'input', 'inside', 'instance', 'int', 'integer', 'interface',
-                'intersect', 'join', 'join_any', 'join_none', 'large', 'let', 'liblist', 'library',
-                'local', 'localparam', 'logic', 'longint', 'macromodule', 'matches', 'medium',
-                'modport', 'module', 'nand', 'negedge', 'new', 'nexttime', 'nmos', 'nor', 'noshowcancelled',
-                'not', 'notif0', 'notif1', 'null', 'or', 'output', 'package', 'packed', 'parameter',
-                'pmos', 'posedge', 'primitive', 'priority', 'program', 'property', 'protected',
-                'pull0', 'pull1', 'pulldown', 'pullup', 'pulsestyle_ondetect', 'pulsestyle_onevent',
-                'pure', 'rand', 'randc', 'randcase', 'randsequence', 'rcmos', 'real', 'realtime',
-                'ref', 'reg', 'reject_on', 'release', 'repeat', 'restrict', 'return', 'rnmos',
-                'rpmos', 'rtran', 'rtranif0', 'rtranif1', 's_always', 's_eventually', 's_nexttime',
-                's_until', 's_until_with', 'scalared', 'sequence', 'shortint', 'shortreal',
-                'showcancelled', 'signed', 'small', 'solve', 'specify', 'specparam', 'static',
-                'string', 'strong', 'strong0', 'strong1', 'struct', 'super', 'supply0', 'supply1',
-                'sync_accept_on', 'sync_reject_on', 'table', 'tagged', 'task', 'this', 'throughout',
-                'time', 'timeprecision', 'timeunit', 'tran', 'tranif0', 'tranif1', 'tri', 'tri0',
-                'tri1', 'triand', 'trior', 'trireg', 'type', 'typedef', 'union', 'unique', 'unique0',
-                'unsigned', 'until', 'until_with', 'untyped', 'use', 'uwire', 'var', 'vectored',
-                'virtual', 'void', 'wait', 'wait_order', 'wand', 'weak', 'weak0', 'weak1', 'while',
-                'wildcard', 'wire', 'with', 'within', 'wor', 'xnor', 'xor'), suffix=r'\b'),
+                'accept_on', 'alias', 'always', 'always_comb', 'always_ff',
+                'always_latch', 'and', 'assert', 'assign', 'assume', 'automatic',
+                'before', 'begin', 'bind', 'bins', 'binsof', 'bit', 'break', 'buf',
+                'bufif0', 'bufif1', 'byte', 'case', 'casex', 'casez', 'cell',
+                'chandle', 'checker', 'class', 'clocking', 'cmos', 'config',
+                'const', 'constraint', 'context', 'continue', 'cover', 'covergroup',
+                'coverpoint', 'cross', 'deassign', 'default', 'defparam', 'design',
+                'disable', 'dist', 'do', 'edge', 'else', 'end', 'endcase',
+                'endchecker', 'endclass', 'endclocking', 'endconfig', 'endfunction',
+                'endgenerate', 'endgroup', 'endinterface', 'endmodule', 'endpackage',
+                'endprimitive', 'endprogram', 'endproperty', 'endsequence',
+                'endspecify', 'endtable', 'endtask', 'enum', 'event', 'eventually',
+                'expect', 'export', 'extends', 'extern', 'final', 'first_match',
+                'for', 'force', 'foreach', 'forever', 'fork', 'forkjoin', 'function',
+                'generate', 'genvar', 'global', 'highz0', 'highz1', 'if', 'iff',
+                'ifnone', 'ignore_bins', 'illegal_bins', 'implies', 'import',
+                'incdir', 'include', 'initial', 'inout', 'input', 'inside',
+                'instance', 'int', 'integer', 'interface', 'intersect', 'join',
+                'join_any', 'join_none', 'large', 'let', 'liblist', 'library',
+                'local', 'localparam', 'logic', 'longint', 'macromodule', 'matches',
+                'medium', 'modport', 'module', 'nand', 'negedge', 'new', 'nexttime',
+                'nmos', 'nor', 'noshowcancelled', 'not', 'notif0', 'notif1', 'null',
+                'or', 'output', 'package', 'packed', 'parameter', 'pmos', 'posedge',
+                'primitive', 'priority', 'program', 'property', 'protected', 'pull0',
+                'pull1', 'pulldown', 'pullup', 'pulsestyle_ondetect',
+                'pulsestyle_onevent', 'pure', 'rand', 'randc', 'randcase',
+                'randsequence', 'rcmos', 'real', 'realtime', 'ref', 'reg',
+                'reject_on', 'release', 'repeat', 'restrict', 'return', 'rnmos',
+                'rpmos', 'rtran', 'rtranif0', 'rtranif1', 's_always', 's_eventually',
+                's_nexttime', 's_until', 's_until_with', 'scalared', 'sequence',
+                'shortint', 'shortreal', 'showcancelled', 'signed', 'small', 'solve',
+                'specify', 'specparam', 'static', 'string', 'strong', 'strong0',
+                'strong1', 'struct', 'super', 'supply0', 'supply1', 'sync_accept_on',
+                'sync_reject_on', 'table', 'tagged', 'task', 'this', 'throughout',
+                'time', 'timeprecision', 'timeunit', 'tran', 'tranif0', 'tranif1',
+                'tri', 'tri0', 'tri1', 'triand', 'trior', 'trireg', 'type',
+                'typedef', 'union', 'unique', 'unique0', 'unsigned', 'until',
+                'until_with', 'untyped', 'use', 'uwire', 'var', 'vectored',
+                'virtual', 'void', 'wait', 'wait_order', 'wand', 'weak', 'weak0',
+                'weak1', 'while', 'wildcard', 'wire', 'with', 'within', 'wor',
+                'xnor', 'xor'), suffix=r'\b'),
              Keyword),
 
             (words((
-                '`__FILE__', '`__LINE__', '`begin_keywords', '`celldefine', '`default_nettype',
-                '`define', '`else', '`elsif', '`end_keywords', '`endcelldefine', '`endif',
-                '`ifdef', '`ifndef', '`include', '`line', '`nounconnected_drive', '`pragma',
-                '`resetall', '`timescale', '`unconnected_drive', '`undef', '`undefineall'),
+                '`__FILE__', '`__LINE__', '`begin_keywords', '`celldefine',
+                '`default_nettype', '`define', '`else', '`elsif', '`end_keywords',
+                '`endcelldefine', '`endif', '`ifdef', '`ifndef', '`include',
+                '`line', '`nounconnected_drive', '`pragma', '`resetall',
+                '`timescale', '`unconnected_drive', '`undef', '`undefineall'),
                 suffix=r'\b'),
              Comment.Preproc),
 
             (words((
-                '$display', '$displayb', '$displayh', '$displayo', '$dumpall', '$dumpfile',
-                '$dumpflush', '$dumplimit', '$dumpoff', '$dumpon', '$dumpports',
-                '$dumpportsall', '$dumpportsflush', '$dumpportslimit', '$dumpportsoff',
-                '$dumpportson', '$dumpvars', '$fclose', '$fdisplay', '$fdisplayb',
-                '$fdisplayh', '$fdisplayo', '$feof', '$ferror', '$fflush', '$fgetc',
-                '$fgets', '$finish', '$fmonitor', '$fmonitorb', '$fmonitorh', '$fmonitoro',
-                '$fopen', '$fread', '$fscanf', '$fseek', '$fstrobe', '$fstrobeb', '$fstrobeh',
+                '$display', '$displayb', '$displayh', '$displayo', '$dumpall',
+                '$dumpfile', '$dumpflush', '$dumplimit', '$dumpoff', '$dumpon',
+                '$dumpports', '$dumpportsall', '$dumpportsflush', '$dumpportslimit',
+                '$dumpportsoff', '$dumpportson', '$dumpvars', '$fclose',
+                '$fdisplay', '$fdisplayb', '$fdisplayh', '$fdisplayo', '$feof',
+                '$ferror', '$fflush', '$fgetc', '$fgets', '$finish', '$fmonitor',
+                '$fmonitorb', '$fmonitorh', '$fmonitoro', '$fopen', '$fread',
+                '$fscanf', '$fseek', '$fstrobe', '$fstrobeb', '$fstrobeh',
                 '$fstrobeo', '$ftell', '$fwrite', '$fwriteb', '$fwriteh', '$fwriteo',
                 '$monitor', '$monitorb', '$monitorh', '$monitoro', '$monitoroff',
-                '$monitoron', '$plusargs', '$random', '$readmemb', '$readmemh', '$rewind',
-                '$sformat', '$sformatf', '$sscanf', '$strobe', '$strobeb', '$strobeh', '$strobeo',
-                '$swrite', '$swriteb', '$swriteh', '$swriteo', '$test', '$ungetc',
-                '$value$plusargs', '$write', '$writeb', '$writeh', '$writememb',
-                '$writememh', '$writeo'), suffix=r'\b'),
+                '$monitoron', '$plusargs', '$random', '$readmemb', '$readmemh',
+                '$rewind', '$sformat', '$sformatf', '$sscanf', '$strobe',
+                '$strobeb', '$strobeh', '$strobeo', '$swrite', '$swriteb',
+                '$swriteh', '$swriteo', '$test', '$ungetc', '$value$plusargs',
+                '$write', '$writeb', '$writeh', '$writememb', '$writememh',
+                '$writeo'), suffix=r'\b'),
              Name.Builtin),
 
             (r'(class)(\s+)', bygroups(Keyword, Text), 'classname'),
@@ -276,15 +279,6 @@
         ]
     }
 
-    def get_tokens_unprocessed(self, text):
-        for index, token, value in \
-                RegexLexer.get_tokens_unprocessed(self, text):
-            # Convention: mark all upper case names as constants
-            if token is Name:
-                if value.isupper():
-                    token = Name.Constant
-            yield index, token, value
-
 
 class VhdlLexer(RegexLexer):
     """

eric ide

mercurial