summaryrefslogtreecommitdiff
path: root/pygments/lexers/scripting.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2016-02-26 10:09:18 +0100
committerGeorg Brandl <georg@python.org>2016-02-26 10:09:18 +0100
commit1e3fa4bde6827107e7f5d6a3f38f57c51618ba82 (patch)
tree1ea6d3e16393aa41f2e647c09d6f979d34cc79da /pygments/lexers/scripting.py
parentd75dd4a9501658a05db7475b4b6d5800a1a92700 (diff)
parent4611730d0ca3cc6baad598f1802759bbf5bcad38 (diff)
downloadpygments-git-1e3fa4bde6827107e7f5d6a3f38f57c51618ba82.tar.gz
merge with stable
Diffstat (limited to 'pygments/lexers/scripting.py')
-rw-r--r--pygments/lexers/scripting.py21
1 files changed, 11 insertions, 10 deletions
diff --git a/pygments/lexers/scripting.py b/pygments/lexers/scripting.py
index 4dd9594b..ac0f7533 100644
--- a/pygments/lexers/scripting.py
+++ b/pygments/lexers/scripting.py
@@ -1020,11 +1020,11 @@ class EasytrieveLexer(RegexLexer):
(r"'(''|[^'])*'", String),
(r'\s+', Whitespace),
# Everything else just belongs to a name
- (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name)
+ (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name),
],
'after_declaration': [
(_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name.Function),
- ('', Whitespace, '#pop')
+ default('#pop'),
],
'after_macro_argument': [
(r'\*.*\n', Comment.Single, '#pop'),
@@ -1032,7 +1032,7 @@ class EasytrieveLexer(RegexLexer):
(_OPERATORS_PATTERN, Operator, '#pop'),
(r"'(''|[^'])*'", String, '#pop'),
# Everything else just belongs to a name
- (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name)
+ (_NON_DELIMITER_OR_COMMENT_PATTERN + r'+', Name),
],
}
_COMMENT_LINE_REGEX = re.compile(r'^\s*\*')
@@ -1122,7 +1122,8 @@ class EasytrieveLexer(RegexLexer):
class JclLexer(RegexLexer):
"""
- `Job Control Language (JCL) <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B570/CCONTENTS>`_
+ `Job Control Language (JCL)
+ <http://publibz.boulder.ibm.com/cgi-bin/bookmgr_OS390/BOOKS/IEA2B570/CCONTENTS>`_
is a scripting language used on mainframe platforms to instruct the system
on how to run a batch job or start a subsystem. It is somewhat
comparable to MS DOS batch and Unix shell scripts.
@@ -1145,10 +1146,10 @@ class JclLexer(RegexLexer):
],
'statement': [
(r'\s*\n', Whitespace, '#pop'),
- (r'([a-z][a-z_0-9]*)(\s+)(exec|job)(\s*)',
+ (r'([a-z]\w*)(\s+)(exec|job)(\s*)',
bygroups(Name.Label, Whitespace, Keyword.Reserved, Whitespace),
'option'),
- (r'[a-z][a-z_0-9]*', Name.Variable, 'statement_command'),
+ (r'[a-z]\w*', Name.Variable, 'statement_command'),
(r'\s+', Whitespace, 'statement_command'),
],
'statement_command': [
@@ -1167,10 +1168,10 @@ class JclLexer(RegexLexer):
(r'\*', Name.Builtin),
(r'[\[\](){}<>;,]', Punctuation),
(r'[-+*/=&%]', Operator),
- (r'[a-z_][a-z_0-9]*', Name),
- (r'[0-9]+\.[0-9]*', Number.Float),
- (r'\.[0-9]+', Number.Float),
- (r'[0-9]+', Number.Integer),
+ (r'[a-z_]\w*', Name),
+ (r'\d+\.\d*', Number.Float),
+ (r'\.\d+', Number.Float),
+ (r'\d+', Number.Integer),
(r"'", String, 'option_string'),
(r'[ \t]+', Whitespace, 'option_comment'),
(r'\.', Punctuation),