summaryrefslogtreecommitdiff
path: root/pygments/lexers/hdl.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2014-11-06 13:36:41 +0100
committerGeorg Brandl <georg@python.org>2014-11-06 13:36:41 +0100
commit90fe03b0f663810f4b6718d89b5e830ec2c67960 (patch)
treed5b69099b513da0db10404445613a226a11c46eb /pygments/lexers/hdl.py
parent01f13cc2e664ebab1815fbaca35f3815160a8d56 (diff)
downloadpygments-90fe03b0f663810f4b6718d89b5e830ec2c67960.tar.gz
Simplify charclasses in a few more modules
Diffstat (limited to 'pygments/lexers/hdl.py')
-rw-r--r--pygments/lexers/hdl.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/pygments/lexers/hdl.py b/pygments/lexers/hdl.py
index 1a9b585a..8b395965 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.Bin),
+ (r'([0-9]+)|(\'b)[01]+', Number.Bin),
(r'([0-9]+)|(\'d)[0-9]+', Number.Integer),
(r'([0-9]+)|(\'o)[0-7]+', Number.Oct),
(r'\'[01xz]', Number),
@@ -173,7 +173,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.Bin),
+ (r'([0-9]+)|(\'b)[01]+', Number.Bin),
(r'([0-9]+)|(\'d)[0-9]+', Number.Integer),
(r'([0-9]+)|(\'o)[0-7]+', Number.Oct),
(r'\'[01xz]', Number),
@@ -317,7 +317,7 @@ class VhdlLexer(RegexLexer):
(r'(library)(\s+)([a-z_]\w*)',
bygroups(Keyword, Text, Name.Namespace)),
(r'(use)(\s+)(entity)', bygroups(Keyword, Text, Keyword)),
- (r'(use)(\s+)([a-z_][\.\w]*)',
+ (r'(use)(\s+)([a-z_][\w.]*)',
bygroups(Keyword, Text, Name.Namespace)),
(r'(entity|component)(\s+)([a-z_]\w*)',
bygroups(Keyword, Text, Name.Class)),
@@ -371,9 +371,9 @@ class VhdlLexer(RegexLexer):
'numbers': [
(r'\d{1,2}#[0-9a-f_]+#?', Number.Integer),
(r'\d+', Number.Integer),
- (r'(\d+\.\d*|\.\d+|\d+)[eE][+-]?\d+', Number.Float),
+ (r'(\d+\.\d*|\.\d+|\d+)E[+-]?\d+', Number.Float),
(r'X"[0-9a-f_]+"', Number.Hex),
(r'O"[0-7_]+"', Number.Oct),
- (r'B"[0-1_]+"', Number.Bin),
+ (r'B"[01_]+"', Number.Bin),
],
}