summaryrefslogtreecommitdiff
path: root/pygments/lexers/parsers.py
diff options
context:
space:
mode:
Diffstat (limited to 'pygments/lexers/parsers.py')
-rw-r--r--pygments/lexers/parsers.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/pygments/lexers/parsers.py b/pygments/lexers/parsers.py
index e1b74dee..43eb6c1f 100644
--- a/pygments/lexers/parsers.py
+++ b/pygments/lexers/parsers.py
@@ -5,7 +5,7 @@
Lexers for parser generators.
- :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -364,13 +364,13 @@ class AntlrLexer(RegexLexer):
# tokensSpec
(r'tokens\b', Keyword, 'tokens'),
# attrScope
- (r'(scope)(\s*)(' + _id + ')(\s*)(\{)',
+ (r'(scope)(\s*)(' + _id + r')(\s*)(\{)',
bygroups(Keyword, Whitespace, Name.Variable, Whitespace,
Punctuation), 'action'),
# exception
(r'(catch|finally)\b', Keyword, 'exception'),
# action
- (r'(@' + _id + ')(\s*)(::)?(\s*)(' + _id + ')(\s*)(\{)',
+ (r'(@' + _id + r')(\s*)(::)?(\s*)(' + _id + r')(\s*)(\{)',
bygroups(Name.Label, Whitespace, Punctuation, Whitespace,
Name.Label, Whitespace, Punctuation), 'action'),
# rule
@@ -405,10 +405,10 @@ class AntlrLexer(RegexLexer):
# L173 ANTLRv3.g from ANTLR book
(r'(scope)(\s+)(\{)', bygroups(Keyword, Whitespace, Punctuation),
'action'),
- (r'(scope)(\s+)(' + _id + ')(\s*)(;)',
+ (r'(scope)(\s+)(' + _id + r')(\s*)(;)',
bygroups(Keyword, Whitespace, Name.Label, Whitespace, Punctuation)),
# ruleAction
- (r'(@' + _id + ')(\s*)(\{)',
+ (r'(@' + _id + r')(\s*)(\{)',
bygroups(Name.Label, Whitespace, Punctuation), 'action'),
# finished prelims, go to rule alts!
(r':', Punctuation, '#pop')
@@ -442,7 +442,7 @@ class AntlrLexer(RegexLexer):
include('comments'),
(r'\{', Punctuation),
(r'(' + _TOKEN_REF + r')(\s*)(=)?(\s*)(' + _STRING_LITERAL
- + ')?(\s*)(;)',
+ + r')?(\s*)(;)',
bygroups(Name.Label, Whitespace, Punctuation, Whitespace,
String, Whitespace, Punctuation)),
(r'\}', Punctuation, '#pop'),
@@ -452,7 +452,7 @@ class AntlrLexer(RegexLexer):
include('comments'),
(r'\{', Punctuation),
(r'(' + _id + r')(\s*)(=)(\s*)(' +
- '|'.join((_id, _STRING_LITERAL, _INT, '\*')) + ')(\s*)(;)',
+ '|'.join((_id, _STRING_LITERAL, _INT, r'\*')) + r')(\s*)(;)',
bygroups(Name.Variable, Whitespace, Punctuation, Whitespace,
Text, Whitespace, Punctuation)),
(r'\}', Punctuation, '#pop'),