mortar-pygments.rb 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Pygments
2
- VERSION = '0.5.5'
2
+ VERSION = '0.5.6'
3
3
  end
@@ -219,7 +219,7 @@ LEXERS = {
219
219
  'OpenEdgeLexer': ('pygments.lexers.other', 'OpenEdge ABL', ('openedge', 'abl', 'progress'), ('*.p', '*.cls'), ('text/x-openedge', 'application/x-openedge')),
220
220
  'Perl6Lexer': ('pygments.lexers.agile', 'Perl6', ('perl6', 'pl6'), ('*.pl', '*.pm', '*.nqp', '*.p6', '*.6pl', '*.p6l', '*.pl6', '*.6pm', '*.p6m', '*.pm6'), ('text/x-perl6', 'application/x-perl6')),
221
221
  'PerlLexer': ('pygments.lexers.agile', 'Perl', ('perl', 'pl'), ('*.pl', '*.pm'), ('text/x-perl', 'application/x-perl')),
222
- 'PigLexer': ('pygments.lexers.sql', 'Pig', ('pig',), ('*.pig',), ()),
222
+ 'PigLexer': ('pygments.lexers.jvm', 'Pig', ('pig',), ('*.pig',), ()),
223
223
  'PhpLexer': ('pygments.lexers.web', 'PHP', ('php', 'php3', 'php4', 'php5'), ('*.php', '*.php[345]', '*.inc'), ('text/x-php',)),
224
224
  'PlPgsqlLexer': ('pygments.lexers.sql', 'PL/pgSQL', ('plpgsql',), (), ('text/x-plpgsql',)),
225
225
  'PostScriptLexer': ('pygments.lexers.other', 'PostScript', ('postscript', 'postscr'), ('*.ps', '*.eps'), ('application/postscript',)),
@@ -21,7 +21,7 @@ from pygments import unistring as uni
21
21
 
22
22
  __all__ = ['JavaLexer', 'ScalaLexer', 'GosuLexer', 'GosuTemplateLexer',
23
23
  'GroovyLexer', 'IokeLexer', 'ClojureLexer', 'KotlinLexer',
24
- 'XtendLexer', 'AspectJLexer', 'CeylonLexer']
24
+ 'XtendLexer', 'AspectJLexer', 'CeylonLexer', 'PigLexer']
25
25
 
26
26
 
27
27
  class JavaLexer(RegexLexer):
@@ -1110,3 +1110,52 @@ class XtendLexer(RegexLexer):
1110
1110
  (r'.', String)
1111
1111
  ],
1112
1112
  }
1113
+
1114
+ class PigLexer(RegexLexer):
1115
+ name = 'Pig'
1116
+ aliases = ['pig']
1117
+ filenames = ['*.pig']
1118
+
1119
+ flags = re.MULTILINE|re.IGNORECASE
1120
+
1121
+ tokens = {
1122
+ 'root': [
1123
+ (r'\s+', Text),
1124
+ (r'--.*', Comment.Singleline),
1125
+ (r'/\*\*([^*][^/]*)/', Comment.Multiline),
1126
+ (r'/\*\*.*\*\*/$', Comment.Singleline),
1127
+ (r'\\\n', Text),
1128
+ (r'\\', Text),
1129
+ (r'\'[^\'^\n]+\'', String),
1130
+ (r'\"[^\"^\n]+\"', String),
1131
+ include('keywords'),
1132
+ include('types'),
1133
+ include('builtins'),
1134
+ (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
1135
+ (r'0x[0-9a-fA-F]+', Number.Hex),
1136
+ (r'[0-9]+L?', Number.Integer),
1137
+ (r'\n', Text),
1138
+ (r'([a-zA-Z_][a-zA-Z0-9_]*)(\s*)(\()',
1139
+ bygroups(Name.Function, Text, Punctuation)),
1140
+ (r'[()#:]', Text),
1141
+ (r'[^(:\n#\'\")]+', Text),
1142
+ (r'\S+\s+', Text)
1143
+ ],
1144
+ 'keywords': [
1145
+ (r'(assert|and|any|all|arrange|as|asc|bag|by|cache|CASE|cat|cd|cp|'
1146
+ r'%declare|%default|define|dense|desc|describe|distinct|du|dump|'
1147
+ r'eval|exex|explain|filter|flatten|foreach|full|generate|group|help|'
1148
+ r'if|illustrate|import|inner|input|into|is|join|kill|left|limit|load|'
1149
+ r'ls|map|matches|mkdir|mv|not|null|onschema|or|order|outer|output|'
1150
+ r'parallel|pig|pwd|quit|register|returns|right|rm|rmf|rollup|run|sample|'
1151
+ r'set|ship|split|stderr|stdin|stdout|store|stream|through|union|using|void)\b', Keyword)
1152
+ ],
1153
+ 'builtins': [
1154
+ (r'(AVG|BinStorage|cogroup|CONCAT|copyFromLocal|copyToLocal|COUNT|'
1155
+ r'cross|DIFF|MAX|MIN|PigDump|PigStorage|SIZE|SUM|TextLoader|TOKENIZE)\b', Name.Builtin)
1156
+ ],
1157
+ 'types':[
1158
+ (r'(bytearray|BIGINTEGER|BIGDECIMAL|chararray|datetime|double|float|'
1159
+ r'int|long|tuple)\b', Keyword.Type)
1160
+ ],
1161
+ }
@@ -557,53 +557,3 @@ class SqliteConsoleLexer(Lexer):
557
557
  for item in do_insertions(insertions,
558
558
  sql.get_tokens_unprocessed(curcode)):
559
559
  yield item
560
-
561
-
562
- class PigLexer(RegexLexer):
563
- name = 'Pig'
564
- aliases = ['pig']
565
- filenames = ['*.pig']
566
-
567
- flags = re.MULTILINE|re.IGNORECASE
568
-
569
- tokens = {
570
- 'root': [
571
- (r'\s+', Text),
572
- (r'--.*', Comment.Singleline),
573
- (r'/\*\*([^*][^/]*)/', Comment.Multiline),
574
- (r'/\*\*.*\*\*/$', Comment.Singleline),
575
- (r'\\\n', Text),
576
- (r'\\', Text),
577
- (r'\'[^\'^\n]+\'', String),
578
- (r'\"[^\"^\n]+\"', String),
579
- include('keywords'),
580
- include('types'),
581
- include('builtins'),
582
- (r'[0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?', Number.Float),
583
- (r'0x[0-9a-fA-F]+', Number.Hex),
584
- (r'[0-9]+L?', Number.Integer),
585
- (r'\n', Text),
586
- (r'([a-zA-Z_][a-zA-Z0-9_]*)(\s*)(\()',
587
- bygroups(Name.Function, Text, Punctuation)),
588
- (r'[()#:]', Text),
589
- (r'[^(:\n#\'\")]+', Text),
590
- (r'\S+\s+', Text)
591
- ],
592
- 'keywords': [
593
- (r'(assert|and|any|all|arrange|as|asc|bag|by|cache|CASE|cat|cd|cp|'
594
- r'%declare|%default|define|dense|desc|describe|distinct|du|dump|'
595
- r'eval|exex|explain|filter|flatten|foreach|full|generate|group|help|'
596
- r'if|illustrate|import|inner|input|into|is|join|kill|left|limit|load|'
597
- r'ls|map|matches|mkdir|mv|not|null|onschema|or|order|outer|output|'
598
- r'parallel|pig|pwd|quit|register|returns|right|rm|rmf|rollup|run|sample|'
599
- r'set|ship|split|stderr|stdin|stdout|store|stream|through|union|using|void)\b', Keyword)
600
- ],
601
- 'builtins': [
602
- (r'(AVG|BinStorage|cogroup|CONCAT|copyFromLocal|copyToLocal|COUNT|'
603
- r'cross|DIFF|MAX|MIN|PigDump|PigStorage|SIZE|SUM|TextLoader|TOKENIZE)\b', Name.Builtin)
604
- ],
605
- 'types':[
606
- (r'(bytearray|BIGINTEGER|BIGDECIMAL|chararray|datetime|double|float|'
607
- r'int|long|tuple)\b', Keyword.Type)
608
- ],
609
- }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mortar-pygments.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: