summaryrefslogtreecommitdiff
path: root/pygments/lexers/compiled.py
diff options
context:
space:
mode:
authorGaurav Jain <gaurav@gauravjain.org>2014-05-15 23:52:25 -0400
committerGaurav Jain <gaurav@gauravjain.org>2014-05-15 23:52:25 -0400
commit414c88e054f41981ec406971403a250f31270dfd (patch)
tree187dac55de5eb5fc2eb6cf8b404f89d288fd5514 /pygments/lexers/compiled.py
parentcf473924c5aa0268cb9e78cff6809a509a94169a (diff)
downloadpygments-414c88e054f41981ec406971403a250f31270dfd.tar.gz
Replace a-z0-9_ with \w when IGNORECASE is set
Diffstat (limited to 'pygments/lexers/compiled.py')
-rw-r--r--pygments/lexers/compiled.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/pygments/lexers/compiled.py b/pygments/lexers/compiled.py
index 54edf9dc..ec3015a5 100644
--- a/pygments/lexers/compiled.py
+++ b/pygments/lexers/compiled.py
@@ -1573,7 +1573,7 @@ class FortranLexer(RegexLexer):
(r'!.*\n', Comment),
include('strings'),
include('core'),
- (r'[a-z][a-z0-9_]*', Name.Variable),
+ (r'[a-z]\w*', Name.Variable),
include('nums'),
(r'[\s]+', Text),
],
@@ -1657,9 +1657,9 @@ class FortranLexer(RegexLexer):
],
'nums': [
- (r'\d+(?![.Ee])(_[a-z][a-z0-9_]+)?', Number.Integer),
- (r'[+-]?\d*\.\d+([eE][-+]?\d+)?(_[a-z][a-z0-9_]+)?', Number.Float),
- (r'[+-]?\d+\.\d*([eE][-+]?\d+)?(_[a-z][a-z0-9_]+)?', Number.Float),
+ (r'\d+(?![.e])(_[a-z]\w+)?', Number.Integer),
+ (r'[+-]?\d*\.\d+(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
+ (r'[+-]?\d+\.\d*(e[-+]?\d+)?(_[a-z]\w+)?', Number.Float),
],
}
@@ -2764,7 +2764,7 @@ class BlitzMaxLexer(RegexLexer):
bmax_vopwords = r'\b(Shl|Shr|Sar|Mod)\b'
bmax_sktypes = r'@{1,2}|[!#$%]'
bmax_lktypes = r'\b(Int|Byte|Short|Float|Double|Long)\b'
- bmax_name = r'[a-z_][a-z0-9_]*'
+ bmax_name = r'[a-z_]\w*'
bmax_var = (r'(%s)(?:(?:([ \t]*)(%s)|([ \t]*:[ \t]*\b(?:Shl|Shr|Sar|Mod)\b)'
r'|([ \t]*)(:)([ \t]*)(?:%s|(%s)))(?:([ \t]*)(Ptr))?)') % \
(bmax_name, bmax_sktypes, bmax_lktypes, bmax_name)
@@ -2859,7 +2859,7 @@ class BlitzBasicLexer(RegexLexer):
r'Abs|Sgn|Handle|Int|Float|Str|'
r'First|Last|Before|After)\b')
bb_sktypes = r'@{1,2}|[#$%]'
- bb_name = r'[a-z][a-z0-9_]*'
+ bb_name = r'[a-z]\w*'
bb_var = (r'(%s)(?:([ \t]*)(%s)|([ \t]*)([.])([ \t]*)(?:(%s)))?') % \
(bb_name, bb_sktypes, bb_name)