ThirdParty/Pygments/pygments/lexers/other.py

changeset 12
1d8dd9706f46
parent 0
de9c2efb9d02
child 684
2f29a0b6e1c7
equal deleted inserted replaced
11:b0996e4a289e 12:1d8dd9706f46
326 *New in Pygments 0.6.* 326 *New in Pygments 0.6.*
327 """ 327 """
328 328
329 name = 'Bash' 329 name = 'Bash'
330 aliases = ['bash', 'sh'] 330 aliases = ['bash', 'sh']
331 filenames = ['*.sh'] 331 filenames = ['*.sh', '*.ebuild', '*.eclass']
332 mimetypes = ['application/x-sh', 'application/x-shellscript'] 332 mimetypes = ['application/x-sh', 'application/x-shellscript']
333 333
334 tokens = { 334 tokens = {
335 'root': [ 335 'root': [
336 include('basic'), 336 include('basic'),
1496 'windows menu', 'wraps', 'zoomable', 'zoomed'] 1496 'windows menu', 'wraps', 'zoomable', 'zoomed']
1497 1497
1498 tokens = { 1498 tokens = {
1499 'root': [ 1499 'root': [
1500 (r'\s+', Text), 1500 (r'\s+', Text),
1501 (ur'¬\n', String.Escape), 1501 (r'¬\n', String.Escape),
1502 (r"'s\s+", Text), # This is a possessive, consider moving 1502 (r"'s\s+", Text), # This is a possessive, consider moving
1503 (r'(--|#).*?$', Comment), 1503 (r'(--|#).*?$', Comment),
1504 (r'\(\*', Comment.Multiline, 'comment'), 1504 (r'\(\*', Comment.Multiline, 'comment'),
1505 (r'[\(\){}!,.:]', Punctuation), 1505 (r'[\(\){}!,.:]', Punctuation),
1506 (ur'(«)([^»]+)(»)', 1506 (r'(«)([^»]+)(»)',
1507 bygroups(Text, Name.Builtin, Text)), 1507 bygroups(Text, Name.Builtin, Text)),
1508 (r'\b((?:considering|ignoring)\s*)' 1508 (r'\b((?:considering|ignoring)\s*)'
1509 r'(application responses|case|diacriticals|hyphens|' 1509 r'(application responses|case|diacriticals|hyphens|'
1510 r'numeric strings|punctuation|white space)', 1510 r'numeric strings|punctuation|white space)',
1511 bygroups(Keyword, Name.Builtin)), 1511 bygroups(Keyword, Name.Builtin)),
1512 (ur'(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|/|÷|\^)', Operator), 1512 (r'(-|\*|\+|&|≠|>=?|<=?|=|≥|≤|/|÷|\^)', Operator),
1513 (r"\b(%s)\b" % '|'.join(Operators), Operator.Word), 1513 (r"\b(%s)\b" % '|'.join(Operators), Operator.Word),
1514 (r'^(\s*(?:on|end)\s+)' 1514 (r'^(\s*(?:on|end)\s+)'
1515 r'(%s)' % '|'.join(StudioEvents), 1515 r'(%s)' % '|'.join(StudioEvents),
1516 bygroups(Keyword, Name.Function)), 1516 bygroups(Keyword, Name.Function)),
1517 (r'^(\s*)(in|on|script|to)(\s+)', bygroups(Text, Keyword, Text)), 1517 (r'^(\s*)(in|on|script|to)(\s+)', bygroups(Text, Keyword, Text)),
1587 (r'(algorithm|annotation|break|connect|constant|constrainedby|' 1587 (r'(algorithm|annotation|break|connect|constant|constrainedby|'
1588 r'discrete|each|else|elseif|elsewhen|encapsulated|enumeration|' 1588 r'discrete|each|else|elseif|elsewhen|encapsulated|enumeration|'
1589 r'end|equation|exit|expandable|extends|' 1589 r'end|equation|exit|expandable|extends|'
1590 r'external|false|final|flow|for|if|import|in|inner|input|' 1590 r'external|false|final|flow|for|if|import|in|inner|input|'
1591 r'loop|nondiscrete|outer|output|parameter|partial|' 1591 r'loop|nondiscrete|outer|output|parameter|partial|'
1592 r'protected|public|redeclare|replaceable|time|then|true|' 1592 r'protected|public|redeclare|replaceable|stream|time|then|true|'
1593 r'when|while|within)\b', Keyword) 1593 r'when|while|within)\b', Keyword)
1594 ], 1594 ],
1595 'functions': [ 1595 'functions': [
1596 (r'(abs|acos|acosh|asin|asinh|atan|atan2|atan3|ceil|cos|cosh|' 1596 (r'(abs|acos|acosh|asin|asinh|atan|atan2|atan3|ceil|cos|cosh|'
1597 r'cross|div|exp|floor|log|log10|mod|rem|sign|sin|sinh|size|' 1597 r'cross|div|exp|floor|log|log10|mod|rem|sign|sin|sinh|size|'

eric ide

mercurial