diff options
author | Georg Brandl <georg@python.org> | 2014-11-06 13:36:41 +0100 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2014-11-06 13:36:41 +0100 |
commit | 90fe03b0f663810f4b6718d89b5e830ec2c67960 (patch) | |
tree | d5b69099b513da0db10404445613a226a11c46eb /pygments/lexers/algebra.py | |
parent | 01f13cc2e664ebab1815fbaca35f3815160a8d56 (diff) | |
download | pygments-90fe03b0f663810f4b6718d89b5e830ec2c67960.tar.gz |
Simplify charclasses in a few more modules
Diffstat (limited to 'pygments/lexers/algebra.py')
-rw-r--r-- | pygments/lexers/algebra.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/pygments/lexers/algebra.py b/pygments/lexers/algebra.py index dd5bfea4..6bb1b086 100644 --- a/pygments/lexers/algebra.py +++ b/pygments/lexers/algebra.py @@ -60,8 +60,8 @@ class GAPLexer(RegexLexer): )\b''', Operator.Word), (r'''(?x) - (?:[a-zA-Z_0-9]+|`[^`]*`) - (?:::[a-zA-Z_0-9]+|`[^`]*`)*''', Name.Variable), + (?:\w+|`[^`]*`) + (?:::\w+|`[^`]*`)*''', Name.Variable), (r'[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?', Number), (r'\.[0-9]+(?:e[0-9]+)?', Number), (r'.', Text) @@ -168,12 +168,12 @@ class MuPADLexer(RegexLexer): (r'\b(?:I|RDN_INF|RD_NINF|RD_NAN)\b', Number), # (r'\b(?:adt|linalg|newDomain|hold)\b', Name.Builtin), (r'''(?x) - ((?:[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`) - (?:::[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)*)(\s*)([(])''', + ((?:[a-zA-Z_#][\w#]*|`[^`]*`) + (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*)(\s*)([(])''', bygroups(Name.Function, Text, Punctuation)), (r'''(?x) - (?:[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`) - (?:::[a-zA-Z_#][a-zA-Z_#0-9]*|`[^`]*`)*''', Name.Variable), + (?:[a-zA-Z_#][\w#]*|`[^`]*`) + (?:::[a-zA-Z_#][\w#]*|`[^`]*`)*''', Name.Variable), (r'[0-9]+(?:\.[0-9]*)?(?:e[0-9]+)?', Number), (r'\.[0-9]+(?:e[0-9]+)?', Number), (r'.', Text) |