diff options
author | Tim Hatch <tim@timhatch.com> | 2012-03-09 12:06:35 -0800 |
---|---|---|
committer | Tim Hatch <tim@timhatch.com> | 2012-03-09 12:06:35 -0800 |
commit | 3fb183049a0408a83436588cf364219163fcf73d (patch) | |
tree | a835d29376fe55baa34d803413165b26e602297e /pygments/lexers | |
parent | 057392c8f40d6ecfc0307c6c862a7ed3e060fe87 (diff) | |
download | pygments-3fb183049a0408a83436588cf364219163fcf73d.tar.gz |
[\w_] is the same as \w
---
pygments/lexers/agile.py | 12 ++++++------
pygments/lexers/other.py | 4 ++--
pygments/lexers/text.py | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
Diffstat (limited to 'pygments/lexers')
-rw-r--r-- | pygments/lexers/agile.py | 12 | ||||
-rw-r--r-- | pygments/lexers/other.py | 4 | ||||
-rw-r--r-- | pygments/lexers/text.py | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/pygments/lexers/agile.py b/pygments/lexers/agile.py index 4e838449..32534787 100644 --- a/pygments/lexers/agile.py +++ b/pygments/lexers/agile.py @@ -506,7 +506,7 @@ class RubyLexer(ExtendedRegexLexer): states = {} states['strings'] = [ # easy ones - (r'\:@{0,2}([a-zA-Z_][\w_]*[\!\?]?|\*\*?|[-+]@?|' + (r'\:@{0,2}([a-zA-Z_]\w*[\!\?]?|\*\*?|[-+]@?|' r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)', String.Symbol), (r":'(\\\\|\\'|[^'])*'", String.Symbol), (r"'(\\\\|\\'|[^'])*'", String.Single), @@ -703,7 +703,7 @@ class RubyLexer(ExtendedRegexLexer): # like keywords (class) or like this: ` ?!? (r'(\.|::)([a-zA-Z_]\w*[\!\?]?|[*%&^`~+-/\[<>=])', bygroups(Operator, Name)), - (r'[a-zA-Z_][\w_]*[\!\?]?', Name), + (r'[a-zA-Z_]\w*[\!\?]?', Name), (r'(\[|\]|\*\*|<<?|>>?|>=|<=|<=>|=~|={3}|' r'!~|&&?|\|\||\.{1,3})', Operator), (r'[-+/*%=<>&!^|~]=?', Operator), @@ -713,7 +713,7 @@ class RubyLexer(ExtendedRegexLexer): 'funcname': [ (r'\(', Punctuation, 'defexpr'), (r'(?:([a-zA-Z_][a-zA-Z0-9_]*)(\.))?' - r'([a-zA-Z_][\w_]*[\!\?]?|\*\*?|[-+]@?|' + r'([a-zA-Z_]\w*[\!\?]?|\*\*?|[-+]@?|' r'[/%&|^`~]|\[\]=?|<<|>>|<=?>|>=?|===?)', bygroups(Name.Class, Operator, Name.Function), '#pop'), (r'', Text, '#pop') @@ -721,7 +721,7 @@ class RubyLexer(ExtendedRegexLexer): 'classname': [ (r'\(', Punctuation, 'defexpr'), (r'<<', Operator, '#pop'), - (r'[A-Z_][\w_]*', Name.Class, '#pop'), + (r'[A-Z_]\w*', Name.Class, '#pop'), (r'', Text, '#pop') ], 'defexpr': [ @@ -949,10 +949,10 @@ class PerlLexer(RegexLexer): (r'(?=[^a-zA-Z0-9_])', Text, '#pop'), ], 'modulename': [ - (r'[a-zA-Z_][\w_]*', Name.Namespace, '#pop') + (r'[a-zA-Z_]\w*', Name.Namespace, '#pop') ], 'funcname': [ - (r'[a-zA-Z_][\w_]*[\!\?]?', Name.Function), + (r'[a-zA-Z_]\w*[\!\?]?', Name.Function), (r'\s+', Text), # argument declaration (r'(\([$@%]*\))(\s*)', bygroups(Punctuation, Text)), diff --git a/pygments/lexers/other.py b/pygments/lexers/other.py index bb5933df..8fe7e5c1 100644 --- a/pygments/lexers/other.py +++ b/pygments/lexers/other.py @@ -1511,9 +1511,9 @@ class ABAPLexer(RegexLexer): (r'(CALL\s+(?:DIALOG|SCREEN|SUBSCREEN|SELECTION-SCREEN|' r'TRANSACTION|TRANSFORMATION))\b', Keyword), - (r'(FORM|PERFORM)(\s+)([\w_]+)', + (r'(FORM|PERFORM)(\s+)(\w+)', bygroups(Keyword, Text, Name.Function)), - (r'(PERFORM)(\s+)(\()([\w_]+)(\))', + (r'(PERFORM)(\s+)(\()(\w+)(\))', bygroups(Keyword, Text, Punctuation, Name.Variable, Punctuation )), (r'(MODULE)(\s+)(\S+)(\s+)(INPUT|OUTPUT)', bygroups(Keyword, Text, Name.Function, Text, Keyword)), diff --git a/pygments/lexers/text.py b/pygments/lexers/text.py index 85fdfbbc..50688da9 100644 --- a/pygments/lexers/text.py +++ b/pygments/lexers/text.py @@ -1702,7 +1702,7 @@ class PyPyLogLexer(RegexLexer): (r"^\+\d+: ", Comment), (r"[ifp]\d+", Name), (r"ptr\d+", Name), - (r"(\()([\w_]+(?:\.[\w_]+)?)(\))", + (r"(\()(\w+(?:\.\w+)?)(\))", bygroups(Punctuation, Name.Builtin, Punctuation)), (r"[\[\]=,()]", Punctuation), (r"(\d+\.\d+|inf|-inf)", Number.Float), |