3 pygments.lexers.automation |
3 pygments.lexers.automation |
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
4 ~~~~~~~~~~~~~~~~~~~~~~~~~~ |
5 |
5 |
6 Lexers for automation scripting languages. |
6 Lexers for automation scripting languages. |
7 |
7 |
8 :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. |
8 :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. |
9 :license: BSD, see LICENSE for details. |
9 :license: BSD, see LICENSE for details. |
10 """ |
10 """ |
11 |
11 |
12 from pygments.lexer import RegexLexer, include, bygroups, combined |
12 from pygments.lexer import RegexLexer, include, bygroups, combined |
13 from pygments.token import Text, Comment, Operator, Name, String, \ |
13 from pygments.token import Text, Comment, Operator, Name, String, \ |
314 @windowsdir @workingdir @yday @year""".split() |
314 @windowsdir @workingdir @yday @year""".split() |
315 |
315 |
316 tokens = { |
316 tokens = { |
317 'root': [ |
317 'root': [ |
318 (r';.*\n', Comment.Single), |
318 (r';.*\n', Comment.Single), |
319 (r'(#comments-start|#cs).*?(#comments-end|#ce)', Comment.Multiline), |
319 (r'(#comments-start|#cs)(.|\n)*?(#comments-end|#ce)', |
|
320 Comment.Multiline), |
320 (r'[\[\]{}(),;]', Punctuation), |
321 (r'[\[\]{}(),;]', Punctuation), |
321 (r'(and|or|not)\b', Operator.Word), |
322 (r'(and|or|not)\b', Operator.Word), |
322 (r'[$|@][a-zA-Z_]\w*', Name.Variable), |
323 (r'[$|@][a-zA-Z_]\w*', Name.Variable), |
323 (r'!=|==|:=|\.=|<<|>>|[-~+/*%=<>&^|?:!.]', Operator), |
324 (r'!=|==|:=|\.=|<<|>>|[-~+/*%=<>&^|?:!.]', Operator), |
324 include('commands'), |
325 include('commands'), |