diff options
author | David Corbett <corbett.dav@husky.neu.edu> | 2014-05-19 18:27:42 -0400 |
---|---|---|
committer | David Corbett <corbett.dav@husky.neu.edu> | 2014-05-19 18:27:42 -0400 |
commit | 17d97617f360f8de37dad25a67b1424f15005d8a (patch) | |
tree | 07e69f1007887aaa311e0fd8d5fbb40408f81506 /pygments/lexers/hdl.py | |
parent | 8e4acf008bbe4233bd075d2f25c7fbafd861f710 (diff) | |
download | pygments-17d97617f360f8de37dad25a67b1424f15005d8a.tar.gz |
Add token type Number.Bin
Diffstat (limited to 'pygments/lexers/hdl.py')
-rw-r--r-- | pygments/lexers/hdl.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pygments/lexers/hdl.py b/pygments/lexers/hdl.py index 6240cfe0..40b1bc54 100644 --- a/pygments/lexers/hdl.py +++ b/pygments/lexers/hdl.py @@ -46,7 +46,7 @@ class VerilogLexer(RegexLexer): (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float), (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), (r'([0-9]+)|(\'h)[0-9a-fA-F]+', Number.Hex), - (r'([0-9]+)|(\'b)[0-1]+', Number.Hex), # should be binary + (r'([0-9]+)|(\'b)[0-1]+', Number.Bin), (r'([0-9]+)|(\'d)[0-9]+', Number.Integer), (r'([0-9]+)|(\'o)[0-7]+', Number.Oct), (r'\'[01xz]', Number), @@ -161,7 +161,7 @@ class SystemVerilogLexer(RegexLexer): (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+[lL]?', Number.Float), (r'(\d+\.\d*|\.\d+|\d+[fF])[fF]?', Number.Float), (r'([0-9]+)|(\'h)[0-9a-fA-F]+', Number.Hex), - (r'([0-9]+)|(\'b)[0-1]+', Number.Hex), # should be binary + (r'([0-9]+)|(\'b)[0-1]+', Number.Bin), (r'([0-9]+)|(\'d)[0-9]+', Number.Integer), (r'([0-9]+)|(\'o)[0-7]+', Number.Oct), (r'\'[01xz]', Number), @@ -346,11 +346,10 @@ class VhdlLexer(RegexLexer): ], 'numbers': [ (r'\d{1,2}#[0-9a-f_]+#?', Number.Integer), - (r'[0-1_]+(\.[0-1_])', Number.Integer), (r'\d+', Number.Integer), (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float), - (r'H"[0-9a-f_]+"', Number.Oct), + (r'X"[0-9a-f_]+"', Number.Hex), (r'O"[0-7_]+"', Number.Oct), - (r'B"[0-1_]+"', Number.Oct), + (r'B"[0-1_]+"', Number.Bin), ], } |