1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
3

V'íc÷ã@@sÐdZddlZddlmZmZddlmZmZddlm	Z	ddl
mZddlm
Z
ddlmZdd	lmZmZdd
lmZddlmZddlmZmZmZmZmZmZmZmZm Z dd
l!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z,m-Z-ddl.m/Z/m0Z0dddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2d3d4d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNg@Z1GdOd„deƒZ2GdPd„deƒZ3GdQd=„d=eƒZ4GdRd>„d>eƒZ5GdSd?„d?eƒZ6GdTd„deƒZ7GdUd'„d'eƒZ8GdVd(„d(eƒZ9GdWd)„d)eƒZ:GdXd+„d+eƒZ;GdYd*„d*eƒZ<GdZd,„d,eƒZ=Gd[d-„d-eƒZ>Gd\d.„d.eƒZ?Gd]d/„d/eƒZ@Gd^d0„d0eƒZAGd_d1„d1eƒZBGd`da„daeƒZCGdbd3„d3eƒZDGdcd4„d4eƒZEGddd5„d5eƒZFGded6„d6eƒZGGdfd$„d$eƒZHGdgdh„dheƒZIGdid#„d#eƒZJGdjd"„d"eƒZKGdkd&„d&eƒZLGdld%„d%eƒZMGdmd„deƒZNGdnd„deƒZOGdod„deƒZPGdpd„deƒZQGdqd„deƒZRGdrd„deƒZSGdsd„deƒZTGdtd„deƒZUGdud„deƒZVGdvd„deƒZWGdwd„deƒZXGdxd„deƒZYGdyd„deƒZZGdzd „d eƒZ[Gd{d„deƒZ\Gd|d!„d!eƒZ]Gd}d~„d~eƒZ^Gdd2„d2eƒZ_Gd€d7„d7eƒZ`Gdd8„d8eƒZaGd‚d9„d9eƒZbGdƒd:„d:eƒZcGd„d…„d…eƒZdGd†d;„d;eƒZeGd‡d<„d<eƒZfGdˆd@„d@eƒZgGd‰dŠ„dŠeƒZhGd‹dA„dAeƒZiGdŒdB„dBeƒZjGddC„dCeƒZkGdŽdD„dDeƒZlGddE„dEeƒZmGddF„dFeƒZnGd‘dG„dGeƒZoGd’dH„dHeƒZpGd“dI„dIeƒZqGd”dJ„dJeƒZrGd•dK„dKeƒZsGd–dL„dLeƒZtGd—dM„dMeƒZuGd˜dN„dNeƒZvdS)™zã
    pygments.lexers.templates
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for various template engines' markup.

    :copyright: Copyright 2006-2022 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
éN)Ú	HtmlLexerÚXmlLexer)ÚJavascriptLexerÚ
LassoLexer)ÚCssLexer)ÚPhpLexer)ÚPythonLexer)Ú	PerlLexer)Ú	JavaLexerÚTeaLangLexer)Ú	YamlLexer)ÚSqlLexer)	ÚLexerÚDelegatingLexerÚ
RegexLexerÚbygroupsÚincludeÚusingÚthisÚdefaultÚcombined)ÚErrorÚPunctuationÚ
WhitespaceÚTextÚCommentÚOperatorÚKeywordÚNameÚStringÚNumberÚOtherÚToken)Úhtml_doctype_matchesÚlooks_like_xmlÚHtmlPhpLexerÚXmlPhpLexerÚCssPhpLexerÚJavascriptPhpLexerÚErbLexerÚ
RhtmlLexerÚXmlErbLexerÚCssErbLexerÚJavascriptErbLexerÚSmartyLexerÚHtmlSmartyLexerÚXmlSmartyLexerÚCssSmartyLexerÚJavascriptSmartyLexerÚDjangoLexerÚHtmlDjangoLexerÚCssDjangoLexerÚXmlDjangoLexerÚJavascriptDjangoLexerÚGenshiLexerÚHtmlGenshiLexerÚGenshiTextLexerÚCssGenshiLexerÚJavascriptGenshiLexerÚMyghtyLexerÚMyghtyHtmlLexerÚMyghtyXmlLexerÚMyghtyCssLexerÚMyghtyJavascriptLexerÚ
MasonLexerÚ	MakoLexerÚ
MakoHtmlLexerÚMakoXmlLexerÚMakoJavascriptLexerÚMakoCssLexerÚJspLexerÚCheetahLexerÚCheetahHtmlLexerÚCheetahXmlLexerÚCheetahJavascriptLexerÚEvoqueLexerÚEvoqueHtmlLexerÚEvoqueXmlLexerÚColdfusionLexerÚColdfusionHtmlLexerÚColdfusionCFCLexerÚ
VelocityLexerÚVelocityHtmlLexerÚVelocityXmlLexerÚSspLexerÚTeaTemplateLexerÚLassoHtmlLexerÚ
LassoXmlLexerÚ
LassoCssLexerÚLassoJavascriptLexerÚHandlebarsLexerÚHandlebarsHtmlLexerÚYamlJinjaLexerÚLiquidLexerÚ	TwigLexerÚ
TwigHtmlLexerÚ
Angular2LexerÚAngular2HtmlLexerÚ
SqlJinjaLexerc@sJeZdZdZdZdZdgZdgZej	dej
ƒZdd„Zd	d
„Z
dd„Zd
S)r)zÙ
    Generic ERB (Ruby Templating) lexer.

    Just highlights ruby code between the preprocessor directives, other data
    is left untouched by the lexer.

    All options are also forwarded to the `RubyLexer`.
    ZERBzhttps://github.com/ruby/erbZerbzapplication/x-ruby-templatingz*(<%%|%%>|<%=|<%#|<%-|<%|-%>|%>|^%[^%].*?$)cKs*ddlm}|f|Ž|_tj|f|ŽdS)Nr)Ú	RubyLexer)Zpygments.lexers.rubyreÚ
ruby_lexerrÚ__init__)ÚselfÚoptionsre©rjú=/tmp/pip-build-gk9425m9/Pygments/pygments/lexers/templates.pyrgDszErbLexer.__init__ccs0|jj|ƒ}|jƒd}}yöxî|dkrR|jƒ}|t|fV|t|ƒ7}d}q$|dkrÈ|jƒ}|dkrˆ|t|fV|d7}d}q|dkrÎ|tj|fV|jƒ}|dt|fV|dt|ƒ7}d}q|dkr>|tj|fV|t|ƒ7}|jƒ}d}x,|jj	|ƒD]\}}	}
|||	|
fVqW|t|ƒ7}d}nˆ|dkrf|t
|fV|t|ƒ7}d}n`|tj|dfVd}x8|jj	|dd
…ƒD] \}}	}
|d||	|
fVq’W|t|ƒ7}d}q$|dkr$|jƒ}|dkrð|t|fVn|tj|fV|t|ƒ7}d}q$WWntk
r*d
SXd
S)z¡
        Since ERB doesn't allow "<%" and other tags inside of ruby
        blocks we have to use a split approach here that fails for
        that too.
        réú<%%ú%%>éz<%#éú<%ú<%=ú<%-ú%>ú-%>N)rmrn)rqrrrs)rtru)rtru)Ú	_block_reÚsplitÚreverseÚpopr!ÚlenrÚPreprocrfÚget_tokens_unprocessedrÚ
IndexError)rhÚtextÚtokensÚstateÚidxÚvalÚtagÚdataZr_idxZr_tokenZr_valuerjrjrkr|Ish



zErbLexer.get_tokens_unprocessedcCsd|krd|krdSdS)Nz<%z%>gš™™™™™Ù?rj)r~rjrjrkÚanalyse_textszErbLexer.analyse_textN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__ÚnameÚurlÚaliasesÚ	mimetypesÚreÚcompileÚMrvrgr|r…rjrjrjrkr)3sDc
@sîeZdZdZdZdZdgZdgZdgZe	j
e	jBZde
fdeejeejƒfd	eejeed
dejƒfdeejejeƒdfd
ejdfgdefd
ejdfdejdfdejfdejfdefdejfdefdejfdejfdejfgdœZdd„Z dS)r.z
    Generic Smarty template lexer.

    Just highlights smarty code between the preprocessor directives, other
    data is left untouched by the lexer.
    ZSmartyzhttps://www.smarty.net/Úsmartyz*.tplzapplication/x-smartyz[^{]+z(\{)(\*.*?\*)(\})z(\{php\})(.*?)(\{/php\})T)Zstartinlinez(\{)(/?[a-zA-Z_]\w*)(\s*)z\{z\s+z#pushz\}z#popz#[a-zA-Z_]\w*#z\$[a-zA-Z_]\w*(\.\w+)*z[~!%^&*()+=|\[\]:;,.<>/?@-]z(true|false|null)\bz>[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'z[a-zA-Z_]\w*)Úrootr‘cCsXd}tjd|ƒr|d7}tjd|ƒr,|d7}tjd|ƒr@|d7}tjd|ƒrT|d7}|S)Ngz\{if\s+.*?\}.*?\{/if\}g333333Ã?z\{include\s+file=.*?\}z \{foreach\s+.*?\}.*?\{/foreach\}z	\{\$.*?\}g{®Gáz„?)rŽÚsearch)r~Úrvrjrjrkr…¾szSmartyLexer.analyse_textN)!r†r‡rˆr‰rŠr‹rŒÚ	filenamesrrŽÚ	MULTILINEÚDOTALLÚflagsr!rrr{rrrÚFunctionrÚVariablerrÚConstantr rÚDoubleÚSingleÚ	Attributerr…rjrjrjrkr.’s:

c@sŽeZdZdZdZdZdgZddgZej	ej
BZdZde
fd	eejeejƒfd
eejeƒfdedeejejejeƒd
fdedeejejejƒfdedfgeejfdedfdedeeejƒdfdedfedƒgdefdedfdedejfedƒgdefedƒdedfgdedfdefdefd ejfd!ejfd"efd#efd$ejfdedfd%edfd&edfdedfdedfdedfgd'œZd(d)„Z d*S)+rSz›
    Generic Velocity template lexer.

    Just highlights velocity directives and variable references, other
    data is left untouched by the lexer.
    ZVelocityzhttps://velocity.apache.org/Zvelocityz*.vmz*.fhtmlz[a-zA-Z_]\w*z[^{#$]+z(#)(\*.*?\*)(#)z
(##)(.*?$)z(#\{?)(z
)(\}?)(\s?\()Údirectiveparamsz)(\}|\b)z\$!?\{?Úvariablez\(Ú
funcparamsz(\.)(ú)z#pushz\}z#popz=(&&|\|\||==?|!=?|[-<>+*%&|^/])|\b(eq|ne|gt|lt|ge|le|not|in)\bz\[Ú
rangeoperatorz\bz\.\.z\]z\s+z[,:]z"(\\\\|\\[^\\]|[^"\\])*"z'(\\\\|\\[^\\]|[^'\\])*'z0[xX][0-9a-fA-F]+[Ll]?z
\b[0-9]+\bz(true|false|null)\bz\)z\{)r’r rŸr£r¡cCsdd}tjd|tjƒr|d7}tjd|tjƒr4|d7}tjd|tjƒrL|d7}tjd|ƒr`|d7}|S)	Ngz #\{?macro\}?\(.*?\).*?#\{?end\}?gÐ?z#\{?if\}?\(.+?\).*?#\{?end\}?g333333Ã?z"#\{?foreach\}?\(.+?\).*?#\{?end\}?z6\$!?\{?[a-zA-Z_]\w*(\([^)]*\))?(\.\w+(\([^)]*\))?)*\}?g{®Gáz„?)rŽr“r—)r~r”rjrjrkr…szVelocityLexer.analyse_textN)!r†r‡rˆr‰rŠr‹rŒr•rŽr–r—r˜Ú
identifierr!rrr{rr™rršrrrrrrœrr rr›rr…rjrjrjrkrSËs^




cs8eZdZdZdZdgZddgZdgZ‡fdd„Z‡Z	S)	rTza
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `HtmlLexer`.

    z
HTML+Velocityz
html+velocityz*.htmlz*.fhtmlztext/html+velocitycstƒjttf|ŽdS)N)ÚsuperrgrrS)rhri)Ú	__class__rjrkrg*szVelocityHtmlLexer.__init__)
r†r‡rˆr‰rŠrŒÚalias_filenamesrrgÚ
__classcell__rjrj)r¦rkrTscs@eZdZdZdZdgZddgZdgZ‡fdd„Zd	d
„Z	‡Z
S)rUz`
    Subclass of the `VelocityLexer` that highlights unlexed data
    with the `XmlLexer`.

    zXML+Velocityzxml+velocityz*.xmlz*.vmzapplication/xml+velocitycstƒjttf|ŽdS)N)r¥rgrrS)rhri)r¦rjrkrg:szVelocityXmlLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gš™™™™™Ù?)rSr…r$)r~r”rjrjrkr…=szVelocityXmlLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkrU.sc@s|eZdZdZdZddgZddgZejej	BZ
defdej
d	fd
efdeej
eeeej
eej
eeeej
ƒfdeej
eeeej
eej
eeeej
ƒfd
eej
eeeejƒdfdeej
eeƒdfdefgdeeeejƒfdeeeeeejƒfdejfdefdejfdejfdejfdejfdejfdefdefgdefdeeej
ƒdfedƒgdefd eeej
ƒdfedƒd!efgd"œZd#d$„Zd%S)&r3a
    Generic `django <http://www.djangoproject.com/documentation/templates/>`_
    and `jinja <https://jinja.pocoo.org/jinja/>`_ template lexer.

    It just highlights django/jinja code between the preprocessor directives,
    other data is left untouched by the lexer.
    zDjango/JinjaZdjangoZjinjazapplication/x-django-templatingzapplication/x-jinjaz[^{]+z\{\{Úvarz	\{#.*?#\}zJ(\{%)(-?\s*)(comment)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endcomment)(\s*-?)(%\})zB(\{%)(-?\s*)(raw)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endraw)(\s*-?)(%\})z'(\{%)(-?\s*)(filter)(\s+)([a-zA-Z_]\w*)Úblockz(\{%)(-?\s*)([a-zA-Z_]\w*)z\{z(\|)(\s*)([a-zA-Z_]\w*)z#(is)(\s+)(not)?(\s+)?([a-zA-Z_]\w*)z%(_|true|false|none|True|False|None)\bzm(in|as|reversed|recursive|not|and|or|is|if|else|import|with(?:(?:out)?\s*context)?|scoped|ignore\s+missing)\bz(loop|block|super|forloop)\bz[a-zA-Z_][\w-]*z\.\w+z:?"(\\\\|\\[^\\]|[^"\\])*"z:?'(\\\\|\\[^\\]|[^'\\])*'z ([{}()\[\]+\-*/%,:~]|[><=]=?|!=)z>[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?z\s+z
(-?)(\}\})z#popÚvarnamesz	(-?)(%\})Ú.)r’r«r©rªcCsPd}tjd|ƒdk	r|d7}tjd|ƒdk	r4|d7}tjd|ƒdk	rL|d7}|S)Ngz\{%\s*(block|extends)gš™™™™™Ù?z\{%\s*if\s*.*?%\}gš™™™™™¹?z\{\{.*?\}\})rŽr“)r~r”rjrjrkr…ŒszDjangoLexer.analyse_textN)r†r‡rˆr‰rŠrŒrrŽrÚSr˜r!rr{rrrrr™rÚPseudoÚBuiltinršrrœrr rrrr…rjrjrjrkr3DsZ
c@sðeZdZdZdZdZdgZddgZdgZdd	e	fd
e
eje	ej
ejeeƒejƒfde
ejej
ejeeƒejƒfde
ejej
eeƒejƒfd
e
ejej
eeƒejƒfdejfde
ejeeƒejƒfdefde
ejeeƒeƒfde
eeƒfg
iZdS)r=zƒ
    Generic myghty templates lexer. Code that isn't Myghty
    markup is yielded as `Token.Other`.

    .. versionadded:: 0.6
    ZMyghtyzhttp://www.myghty.org/Zmyghtyz*.mytZautodelegatezapplication/x-myghtyr’z\s+z3(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)z#(?s)(<%\w+)(.*?)(>)(.*?)(</%\2\s*>)z(<&[^|])(.*?)(,.*?)?(&>)z(?s)(<&\|)(.*?)(,.*?)?(&>)z</&>z(?s)(<%!?)(.*?)(%>)z(?<=^)#[^\n]*(\n|\Z)z(?<=^)(%)([^\n]*)(\n|\Z)aË(?sx)
                 (.+?)               # anything, followed by:
                 (?:
                  (?<=\n)(?=[%#]) |  # an eval or comment line
                  (?=</?[%&]) |      # a substitution or block or
                                     # call start or end
                                     # - don't consume
                  (\\\n) |           # an escaped newline
                  \Z                 # end of string
                 )N)r†r‡rˆr‰rŠr‹rŒr•rrrrÚTagr™rrrrr!rrrjrjrjrkr=—s2
cs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)r>zy
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.6
    zHTML+Myghtyzhtml+myghtyztext/html+myghtycstƒjttf|ŽdS)N)r¥rgrr=)rhri)r¦rjrkrgÒszMyghtyHtmlLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkr>Æs
cs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)r?zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.6
    z
XML+Myghtyz
xml+myghtyzapplication/xml+myghtycstƒjttf|ŽdS)N)r¥rgrr=)rhri)r¦rjrkrgâszMyghtyXmlLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkr?Ös
cs6eZdZdZdZddgZdddgZ‡fdd	„Z‡ZS)
rAz
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `JavascriptLexer`.

    .. versionadded:: 0.6
    zJavaScript+Myghtyzjavascript+myghtyz	js+myghtyzapplication/x-javascript+myghtyztext/x-javascript+myghtyztext/javascript+mygthycstƒjttf|ŽdS)N)r¥rgrr=)rhri)r¦rjrkrgôszMyghtyJavascriptLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrAæscs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)r@zx
    Subclass of the `MyghtyLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.6
    z
CSS+Myghtyz
css+myghtyztext/css+myghtycstƒjttf|ŽdS)N)r¥rgrr=)rhri)r¦rjrkrgszMyghtyCssLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkr@øs
c@seZdZdZdZdZdgZddddd	d
gZdgZdd
e	fde
eje
jejƒfde
eje	ejejeeƒejƒfde
ejdddeeƒejƒfde
ejejeeƒejƒfde
ejejeeƒejƒfdejfde
ejeeƒejƒfde
fde
ejeeƒeƒfde
eeƒeƒfgiZdd„ZdS)rBz‡
    Generic mason templates lexer. Stolen from Myghty lexer. Code that isn't
    Mason markup is HTML.

    .. versionadded:: 1.4
    ZMasonzhttp://www.masonhq.com/Zmasonz*.mz*.mhtmlz*.mcz*.miZautohandlerZdhandlerzapplication/x-masonr’z\s+z(?s)(<%doc>)(.*?)(</%doc>)z3(?s)(<%(?:def|method))(\s*)(.*?)(>)(.*?)(</%\2\s*>)z%(?s)(<%(\w+)(.*?)(>))(.*?)(</%\2\s*>)Nz(?s)(<&[^|])(.*?)(,.*?)?(&>)z(?s)(<&\|)(.*?)(,.*?)?(&>)z</&>z(?s)(<%!?)(.*?)(%>)z(?<=^)#[^\n]*(\n|\Z)z(?<=^)(%)([^\n]*)(\n|\Z)aË(?sx)
                 (.+?)               # anything, followed by:
                 (?:
                  (?<=\n)(?=[%#]) |  # an eval or comment line
                  (?=</?[%&]) |      # a substitution or block or
                                     # call start or end
                                     # - don't consume
                  (\\\n) |           # an escaped newline
                  \Z                 # end of string
                 )cCs6d}tjd|ƒdk	rd}ntjd|tjƒdk	r2d}|S)Ngz</%(class|doc|init)>gð?z<&.+&>g)\Âõ(¼?)rŽr“r—)r~Úresultrjrjrkr…6szMasonLexer.analyse_text)r†r‡rˆr‰rŠr‹rŒr•rrrrr°rÚ	Multiliner™rrr	r!rrrr…rjrjrjrkrBs6
c
@s<eZdZdZdZdZdgZdgZdgZde	e
jej
eeƒfde	e
jej
eeƒeƒfd	e	e
jeje
jƒfd
ejfde	ej
ejƒdfd
e	ej
ejej
ƒfdej
dfde	ej
eeƒej
ƒfde	ej
eeƒej
ƒfde	eeƒfde
fgdej
fdejfedƒgde	eje
eƒfdej
dfde
fgdedfdedfdedfgdœZdS)rCz
    Generic mako templates lexer. Code that isn't Mako
    markup is yielded as `Token.Other`.

    .. versionadded:: 0.7
    ZMakozhttp://www.makotemplates.org/Zmakoz*.maozapplication/x-makoz(\s*)(%)(\s*end(?:\w+))(\n|\Z)z(\s*)(%)([^\n]*)(\n|\Z)z(\s*)(##[^\n]*)(\n|\Z)z(?s)<%doc>.*?</%doc>z
(<%)([\w.:]+)rƒz(</%)([\w.:]+)(>)z<%(?=([\w.:]+))Ú	ondeftagsz(?s)(<%(?:!?))(.*?)(%>)z(\$\{)(.*?)(\})a\(?sx)
                (.+?)                # anything, followed by:
                (?:
                 (?<=\n)(?=%|\#\#) | # an eval or comment line
                 (?=\#\*) |          # multiline comment
                 (?=</?%) |          # a python block
                                     # call start or end
                 (?=\$\{) |          # a substitution
                 (?<=\n)(?=\s*%) |
                                     # - don't consume
                 (\\\n) |            # an escaped newline
                 \Z                  # end of string
                )
            z\s+z<%z'(?<=<%)(include|inherit|namespace|page)z((?:\w+)\s*=)(\s*)(".*?")z/?\s*>z#popz".*?"z'.*?'z[^\s>]+)r’r³rƒÚattrN)r†r‡rˆr‰rŠr‹rŒr•rrrrrr{rr!rrrr²rr¯rrržrrrjrjrjrkrC?sD

cs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)rDzw
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `HtmlLexer`.

    .. versionadded:: 0.7
    z	HTML+Makoz	html+makoztext/html+makocstƒjttf|ŽdS)N)r¥rgrrC)rhri)r¦rjrkrgŽszMakoHtmlLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrD‚s
cs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)rEzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `XmlLexer`.

    .. versionadded:: 0.7
    zXML+Makozxml+makozapplication/xml+makocstƒjttf|ŽdS)N)r¥rgrrC)rhri)r¦rjrkrgžszMakoXmlLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrE’s
cs6eZdZdZdZddgZdddgZ‡fdd	„Z‡ZS)
rFz}
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `JavascriptLexer`.

    .. versionadded:: 0.7
    zJavaScript+Makozjavascript+makozjs+makozapplication/x-javascript+makoztext/x-javascript+makoztext/javascript+makocstƒjttf|ŽdS)N)r¥rgrrC)rhri)r¦rjrkrg°szMakoJavascriptLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrF¢scs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)rGzv
    Subclass of the `MakoLexer` that highlights unlexed data
    with the `CssLexer`.

    .. versionadded:: 0.7
    zCSS+Makozcss+makoz
text/css+makocstƒjttf|ŽdS)N)r¥rgrrC)rhri)r¦rjrkrgÀszMakoCssLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrG´s
c@seZdZdZdd„ZdS)ÚCheetahPythonLexerzI
    Lexer for handling Cheetah's special $ tokens in Python syntax.
    ccsNtf|jŽ}x<|j|ƒD].\}}}|tjkr:|dkr:tj}|||fVqWdS)Nú$)rrir|r"rrr{)rhr~ZpylexerÚposÚtype_Úvaluerjrjrkr|Ës
z)CheetahPythonLexer.get_tokens_unprocessedN)r†r‡rˆr‰r|rjrjrjrkrµÆsrµc@s¢eZdZdZdZdZddgZddgZdd	gZd
de	e
ƒfde
fd
e
jfde
jfde	e
jee
ƒe
jƒfde	e
jee
ƒƒfde	e
jee
ƒe
jƒfdefdefg	iZdS)rIzô
    Generic cheetah templates lexer. Code that isn't Cheetah
    markup is yielded as `Token.Other`.  This also works for
    `spitfire templates`_ which use the same syntax.

    .. _spitfire templates: http://code.google.com/p/spitfire/
    ZCheetahzhttp://www.cheetahtemplate.org/ZcheetahZspitfirez*.tmplz*.sptzapplication/x-cheetahzapplication/x-spitfirer’z(##[^\n]*)$z#[*](.|\n)*?[*]#z#end[^#\n]*(?:#|$)z#slurp$z(#[a-zA-Z]+)([^#\n]*)(#|$)z(\$)([a-zA-Z_][\w.]*\w)z(?s)(\$\{!?)(.*?)(\})a(?sx)
                (.+?)               # anything, followed by:
                (?:
                 (?=\#[#a-zA-Z]*) | # an eval comment
                 (?=\$[a-zA-Z_{]) | # a substitution
                 \Z                 # end of string
                )
            z\s+N)r†r‡rˆr‰rŠr‹rŒr•rrrr{rrµr!rrrjrjrjrkrIÓs,cs6eZdZdZdZdddgZddgZ‡fdd	„Z‡ZS)
rJz_
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `HtmlLexer`.
    zHTML+Cheetahzhtml+cheetahz
html+spitfireZhtmlcheetahztext/html+cheetahztext/html+spitfirecstƒjttf|ŽdS)N)r¥rgrrI)rhri)r¦rjrkrg	szCheetahHtmlLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrJÿs

cs4eZdZdZdZddgZddgZ‡fdd„Z‡ZS)	rKz^
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `XmlLexer`.
    zXML+Cheetahzxml+cheetahzxml+spitfirezapplication/xml+cheetahzapplication/xml+spitfirecstƒjttf|ŽdS)N)r¥rgrrI)rhri)r¦rjrkrgszCheetahXmlLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrK
s
cs@eZdZdZdZddddgZddd	d
ddgZ‡fd
d„Z‡ZS)rLze
    Subclass of the `CheetahLexer` that highlights unlexed data
    with the `JavascriptLexer`.
    zJavaScript+Cheetahzjavascript+cheetahz
js+cheetahzjavascript+spitfirezjs+spitfirez application/x-javascript+cheetahztext/x-javascript+cheetahztext/javascript+cheetahz!application/x-javascript+spitfireztext/x-javascript+spitfireztext/javascript+spitfirecstƒjttf|ŽdS)N)r¥rgrrI)rhri)r¦rjrkrg+szCheetahJavascriptLexer.__init__)	r†r‡rˆr‰rŠrŒrrgr¨rjrj)r¦rkrLsc
@s¾eZdZdZdZdZdgZddgZdefde	e
eƒfd	e	e
ejƒd
fe
dƒdefgd
e
dfdeeƒdfde	ee
eeƒƒdfdedfde	ee
eƒdfgde	ejeeƒejƒfdejfgdœZdS)r:z8
    A lexer that highlights genshi text templates.
    zGenshi Textzhttp://genshi.edgewall.org/Z
genshitextzapplication/x-genshi-textz
text/x-genshiz[^#$\s]+z
^(\s*)(##.*)$z	^(\s*)(#)Ú	directiver z[#$\s]z\nz#popz(?:def|for|if)\s+.*z (choose|when|with)([^\S\n]+)(.*)z(choose|otherwise)\bz(end\w*)([^\S\n]*)(.*)z(?<!\$)(\$\{)(.+?)(\})z(?<!\$)(\$)([a-zA-Z_][\w.]*))r’rºr N)r†r‡rˆr‰rŠr‹rŒrr!rrrr{rrrrrršrrjrjrjrkr:/s(c
@sHeZdZdZejZdefdee	j
eeƒe	j
ƒfdefde
jdfde
jdfed	ƒd
efgdefde
jd
fde
jdfgdeeeeƒeƒdfdeeeeƒeƒdfdedfgdefde
jd
fde
jdfde
jdfgdedfdedfdedfgdedfedƒdefgdedfedƒdefgdefed	ƒgdee	j
eeƒe	j
ƒfde
jfgdœ	ZdS) ÚGenshiMarkupLexerzX
    Base lexer for Genshi markup, used by `HtmlGenshiLexer` and
    `GenshiLexer`.
    z[^<$]+z(<\?python)(.*?)(\?>)z'<\s*(script|style)\s*.*?>.*?<\s*/\1\s*>z<\s*py:[a-zA-Z0-9]+Úpytagz<\s*[a-zA-Z0-9:.]+rƒr z[<$]z\s+z[\w:-]+\s*=Úpyattrz/?\s*>z#popz(")(.*?)(")z(')(.*?)(')z[^\s>]+z
py:[\w-]+\s*=r´ú"zattr-dstringú'zattr-sstringz[^\s>]*Ústringsz[^"'$]+z(?<!\$)(\$\{)(.+?)(\})z(?<!\$)(\$)([a-zA-Z_][\w\.]*))	r’r¼r½rƒr´zattr-dstringzattr-sstringrÀr N)r†r‡rˆr‰rŽr—r˜r!rrr{rrrr°rrržrršrrjrjrjrkr»RsF






r»csDeZdZdZdZddgZdddgZdgZ‡fd	d
„Zdd„Z	‡Z
S)
r9z‰
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid HTML templates.
    zHTML+Genshizhtml+genshizhtml+kidz*.htmlz*.htmz*.xhtmlztext/html+genshicstƒjttf|ŽdS)N)r¥rgrr»)rhri)r¦rjrkrgszHtmlGenshiLexer.__init__cCsFd}tjd|ƒdk	r|d7}tjd|ƒdk	r4|d7}|tj|ƒdS)Ngz	\$\{.*?\}gš™™™™™É?zpy:(.*?)=["\']g{®Gáz„?)rŽr“rr…)r~r”rjrjrkr… szHtmlGenshiLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr9’s
csLeZdZdZdZddddgZdgZdgZd	d
gZ‡fdd„Z	d
d„Z
‡ZS)r8zˆ
    A lexer that highlights `genshi <http://genshi.edgewall.org/>`_ and
    `kid <http://kid-templating.org/>`_ kid XML templates.
    ZGenshiÚgenshiZkidz
xml+genshizxml+kidz*.kidz*.xmlzapplication/x-genshizapplication/x-kidcstƒjttf|ŽdS)N)r¥rgrr»)rhri)r¦rjrkrgµszGenshiLexer.__init__cCsFd}tjd|ƒdk	r|d7}tjd|ƒdk	r4|d7}|tj|ƒdS)Ngz	\$\{.*?\}gš™™™™™É?zpy:(.*?)=["\']g{®Gáz„?)rŽr“rr…)r~r”rjrjrkr…¸szGenshiLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr8©scsHeZdZdZdZddddgZdgZdd	d
gZ‡fdd„Zd
d„Z	‡Z
S)r<zK
    A lexer that highlights javascript code in genshi text templates.
    zJavaScript+Genshi Textz
js+genshitextz	js+genshizjavascript+genshitextzjavascript+genshiz*.jszapplication/x-javascript+genshiztext/x-javascript+genshiztext/javascript+genshicstƒjttf|ŽdS)N)r¥rgrr:)rhri)r¦rjrkrgÎszJavascriptGenshiLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r8r…)r~rjrjrkr…Ñsz"JavascriptGenshiLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr<Áscs@eZdZdZdZddgZdgZdgZ‡fdd„Zd	d
„Z	‡Z
S)r;zK
    A lexer that highlights CSS definitions in genshi text templates.
    zCSS+Genshi Textzcss+genshitextz
css+genshiz*.cssztext/css+genshicstƒjttf|ŽdS)N)r¥rgrr:)rhri)r¦rjrkrgßszCssGenshiLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r8r…)r~rjrjrkr…âszCssGenshiLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr;ÕscsLeZdZdZdZdddgZdgZddd	gZd
gZ‡fdd„Z	d
d„Z
‡ZS)r*z
    Subclass of the ERB lexer that highlights the unlexed data with the
    html lexer.

    Nested Javascript and CSS is highlighted too.
    ZRHTMLZrhtmlzhtml+erbz	html+rubyz*.rhtmlz*.htmlz*.htmz*.xhtmlztext/html+rubycstƒjttf|ŽdS)N)r¥rgrr))rhri)r¦rjrkrgôszRhtmlLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gà?)r)r…r#)r~r”rjrjrkr…÷szRhtmlLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr*æs

cs@eZdZdZdZddgZdgZdgZ‡fdd„Zd	d
„Z	‡Z
S)r+zo
    Subclass of `ErbLexer` which highlights data outside preprocessor
    directives with the `XmlLexer`.
    zXML+Rubyzxml+rubyzxml+erbz*.xmlzapplication/xml+rubycstƒjttf|ŽdS)N)r¥rgrr))rhri)r¦rjrkrg
szXmlErbLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gš™™™™™Ù?)r)r…r$)r~r”rjrjrkr…
szXmlErbLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr+ÿscs@eZdZdZdZddgZdgZdgZ‡fdd„Zd	d
„Z	‡Z
S)r,zS
    Subclass of `ErbLexer` which highlights unlexed data with the `CssLexer`.
    zCSS+Rubyzcss+rubyzcss+erbz*.cssz
text/css+rubycstƒjttf|ŽdS)N)r¥rgrr))rhri)r¦rjrkrgszCssErbLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r)r…)r~rjrjrkr…!szCssErbLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr,scsHeZdZdZdZddddgZdgZdd	d
gZ‡fdd„Zd
d„Z	‡Z
S)r-z^
    Subclass of `ErbLexer` which highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Rubyzjavascript+rubyzjs+rubyzjavascript+erbzjs+erbz*.jszapplication/x-javascript+rubyztext/x-javascript+rubyztext/javascript+rubycstƒjttf|ŽdS)N)r¥rgrr))rhri)r¦rjrkrg2szJavascriptErbLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r)r…)r~rjrjrkr…5szJavascriptErbLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr-%scsTeZdZdZdZdgZdgZddddd	gZd
ddd
dgZ‡fdd„Z	dd„Z
‡ZS)r%zˆ
    Subclass of `PhpLexer` that highlights unhandled data with the `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+PHPzhtml+phpz*.phtmlz*.phpz*.htmlz*.htmz*.xhtmlz
*.php[345]zapplication/x-phpzapplication/x-httpd-phpzapplication/x-httpd-php3zapplication/x-httpd-php4zapplication/x-httpd-php5cstƒjttf|ŽdS)N)r¥rgrr)rhri)r¦rjrkrgIszHtmlPhpLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gà?)rr…r#)r~r”rjrjrkr…LszHtmlPhpLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr%9scsBeZdZdZdZdgZdddgZdgZ‡fdd	„Zd
d„Z	‡Z
S)r&zT
    Subclass of `PhpLexer` that highlights unhandled data with the `XmlLexer`.
    zXML+PHPzxml+phpz*.xmlz*.phpz
*.php[345]zapplication/xml+phpcstƒjttf|ŽdS)N)r¥rgrr)rhri)r¦rjrkrg]szXmlPhpLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gš™™™™™Ù?)rr…r$)r~r”rjrjrkr…`szXmlPhpLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr&Ss
cs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
r'zU
    Subclass of `PhpLexer` which highlights unmatched data with the `CssLexer`.
    zCSS+PHPzcss+phpz*.cssztext/css+phpcstƒjttf|ŽdS)N)r¥rgrr)rhri)r¦rjrkrgqszCssPhpLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)rr…)r~rjrjrkr…tszCssPhpLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr'gscsDeZdZdZdZddgZdgZdddgZ‡fd	d
„Zdd„Z	‡Z
S)
r(z`
    Subclass of `PhpLexer` which highlights unmatched data with the
    `JavascriptLexer`.
    zJavaScript+PHPzjavascript+phpzjs+phpz*.jszapplication/x-javascript+phpztext/x-javascript+phpztext/javascript+phpcstƒjttf|ŽdS)N)r¥rgrr)rhri)r¦rjrkrg…szJavascriptPhpLexer.__init__cCs
tj|ƒS)N)rr…)r~rjrjrkr…ˆszJavascriptPhpLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr(xscsDeZdZdZdZdgZddddgZdgZ‡fd	d
„Zdd„Z	‡Z
S)
r/z‘
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Smartyzhtml+smartyz*.htmlz*.htmz*.xhtmlz*.tplztext/html+smartycstƒjttf|ŽdS)N)r¥rgrr.)rhri)r¦rjrkrg™szHtmlSmartyLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gà?)r.r…r#)r~r”rjrjrkr…œszHtmlSmartyLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr/Œscs@eZdZdZdZdgZddgZdgZ‡fdd„Zd	d
„Z	‡Z
S)r0z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `XmlLexer`.
    z
XML+Smartyz
xml+smartyz*.xmlz*.tplzapplication/xml+smartycstƒjttf|ŽdS)N)r¥rgrr.)rhri)r¦rjrkrg®szXmlSmartyLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gš™™™™™Ù?)r.r…r$)r~r”rjrjrkr…±szXmlSmartyLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr0£scs@eZdZdZdZdgZddgZdgZ‡fdd„Zd	d
„Z	‡Z
S)r1z]
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `CssLexer`.
    z
CSS+Smartyz
css+smartyz*.cssz*.tplztext/css+smartycstƒjttf|ŽdS)N)r¥rgrr.)rhri)r¦rjrkrgÃszCssSmartyLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r.r…)r~rjrjrkr…ÆszCssSmartyLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr1¸scsFeZdZdZdZddgZddgZddd	gZ‡fd
d„Zdd
„Z	‡Z
S)r2zd
    Subclass of the `SmartyLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Smartyzjavascript+smartyz	js+smartyz*.jsz*.tplzapplication/x-javascript+smartyztext/x-javascript+smartyztext/javascript+smartycstƒjttf|ŽdS)N)r¥rgrr.)rhri)r¦rjrkrg×szJavascriptSmartyLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r.r…)r~rjrjrkr…Úsz"JavascriptSmartyLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr2ÊscsXeZdZdZdZdddgZdddd	d
dgZdd
dgZddgZ‡fdd„Z	dd„Z
‡ZS)r4z‘
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `HtmlLexer`.

    Nested Javascript and CSS is highlighted too.
    zHTML+Django/Jinjazhtml+djangoz
html+jinjaZ
htmldjangoz	*.html.j2z*.htm.j2z
*.xhtml.j2z
*.html.jinja2z*.htm.jinja2z*.xhtml.jinja2z*.htmlz*.htmz*.xhtmlztext/html+djangoztext/html+jinjacstƒjttf|ŽdS)N)r¥rgrr3)rhri)r¦rjrkrgìszHtmlDjangoLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gà?)r3r…r#)r~r”rjrjrkr…ïszHtmlDjangoLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr4Þs

csJeZdZdZdZddgZddgZdgZdd	gZ‡fd
d„Z	dd
„Z
‡ZS)r6z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `XmlLexer`.
    zXML+Django/Jinjaz
xml+djangoz	xml+jinjaz*.xml.j2z*.xml.jinja2z*.xmlzapplication/xml+djangozapplication/xml+jinjacstƒjttf|ŽdS)N)r¥rgrr3)rhri)r¦rjrkrgszXmlDjangoLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gš™™™™™Ù?)r3r…r$)r~r”rjrjrkr…szXmlDjangoLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr6öscsJeZdZdZdZddgZddgZdgZdd	gZ‡fd
d„Z	dd
„Z
‡ZS)r5z]
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `CssLexer`.
    zCSS+Django/Jinjaz
css+djangoz	css+jinjaz*.css.j2z*.css.jinja2z*.cssztext/css+djangoztext/css+jinjacstƒjttf|ŽdS)N)r¥rgrr3)rhri)r¦rjrkrgszCssDjangoLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r3r…)r~rjrjrkr…szCssDjangoLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr5scsVeZdZdZdZddddgZddgZd	gZd
ddd
ddgZ‡fdd„Z	dd„Z
‡ZS)r7zd
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `JavascriptLexer`.
    zJavaScript+Django/Jinjazjavascript+djangoz	js+djangozjavascript+jinjazjs+jinjaz*.js.j2z*.js.jinja2z*.jszapplication/x-javascript+djangozapplication/x-javascript+jinjaztext/x-javascript+djangoztext/x-javascript+jinjaztext/javascript+djangoztext/javascript+jinjacstƒjttf|ŽdS)N)r¥rgrr3)rhri)r¦rjrkrg1szJavascriptDjangoLexer.__init__cCstj|ƒdS)Ngš™™™™™©?)r3r…)r~rjrjrkr…4sz"JavascriptDjangoLexer.analyse_text)r†r‡rˆr‰rŠrŒr•r§rrgr…r¨rjrj)r¦rkr7sc@sFeZdZdZdedfdefdefdefgdedfd	eeƒfgd
œZdS)ÚJspRootLexerzt
    Base for the `JspLexer`. Yields `Token.Other` for area outside of
    JSP tags.

    .. versionadded:: 0.7
    z<%\S?ÚseczC</?jsp:(forward|getProperty|include|plugin|setProperty|useBean).*?>z[^<]+ú<z%>z#popz[\w\W]+?(?=%>|\Z))r’rÃN)	r†r‡rˆr‰rr!rr
rrjrjrjrkrÂ8srÂcs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
rHzA
    Lexer for Java Server Pages.

    .. versionadded:: 0.7
    zJava Server PageZjspz*.jspzapplication/x-jspcstƒjttf|ŽdS)N)r¥rgrrÂ)rhri)r¦rjrkrg\szJspLexer.__init__cCs:tj|ƒd}t|ƒr|d7}d|kr6d|kr6|d7}|S)Ng{®Gáz„?gš™™™™™Ù?z<%z%>gš™™™™™¹?)r
r…r$)r~r”rjrjrkr…_szJspLexer.analyse_text)r†r‡rˆr‰rŠrŒr•rrgr…r¨rjrj)r¦rkrHQsc@süeZdZdZdZdgZdgZdgZej	Z
defdej
dfd	efd
ej
fdeeejedeeƒfd
eeejedeeeƒeƒfdeeejedeeƒeƒfdeeejƒfdeedeeƒejddeƒfdefg
dej
fdej
dfdej
dfdej
fgdœZdd„ZdS)rMzR
    For files using the Evoque templating system.

    .. versionadded:: 1.1
    ZEvoqueZevoquez*.evoquezapplication/x-evoquez[^#$]+z#\[Úcommentz\$\$z\$\w+:[^$\n]*\$z'(\$)(begin|end)(\{(%)?)(.*?)((?(4)%)\})Nz>(\$)(evoque|overlay)(\{(%)?)(\s*[#\w\-"\'.]+)?(.*?)((?(4)%)\})z!(\$)(\w+)(\{(%)?)(.*?)((?(4)%)\})z(\$)(else|rof|fi)z%(\$\{(%)?)(.*?)((!)(.*?))?((?(2)%)\})ú#z[^\]#]z#pushz\]#z#popz[\]#])r’rÅcCsd|krdSdS)z.Evoque templates use $evoque, which is unique.z$evoquerlNrj)r~rjrjrkr…œszEvoqueLexer.analyse_text)r†r‡rˆr‰rŠrŒr•rrŽr—r˜r!rr²rrrr¯rrrrr…rjrjrjrkrMhs:


cs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
rNzy
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 1.1
    zHTML+Evoquezhtml+evoquez*.htmlztext/html+evoquecstƒjttf|ŽdS)N)r¥rgrrM)rhri)r¦rjrkrg­szEvoqueHtmlLexer.__init__cCs
tj|ƒS)N)rMr…)r~rjrjrkr…°szEvoqueHtmlLexer.analyse_text)r†r‡rˆr‰rŠrŒr•rrgr…r¨rjrj)r¦rkrN¡scs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
rOzx
    Subclass of the `EvoqueLexer` that highlights unlexed data with the
    `XmlLexer`.

    .. versionadded:: 1.1
    z
XML+Evoquez
xml+evoquez*.xmlzapplication/xml+evoquecstƒjttf|ŽdS)N)r¥rgrrM)rhri)r¦rjrkrgÀszEvoqueXmlLexer.__init__cCs
tj|ƒS)N)rMr…)r~rjrjrkr…ÃszEvoqueXmlLexer.analyse_text)r†r‡rˆr‰rŠrŒr•rrgr…r¨rjrj)r¦rkrO´sc@sèeZdZdZdZdgZgZgZej	Z
dejfdej
fdefdefdefd	efd
efdefdefd
ejdfdejfdefdefdejfdejfdeejeeƒfdejfdefdefgdejfdejfdejfdejfd
ejdfgdœZdS)rPz
    Coldfusion statements
    ZcfstatementZcfsz//.*?\nz/\*(?:.|\n)*?\*/z\+\+|--z
[-+*/^&=!]z<=|>=|<|>|==zmod\bz"(eq|lt|gt|lte|gte|not|is|and|or)\bz\|\||&&z\?r¾Ústringz'.*?'z\d+zÎ(if|else|len|var|xml|default|break|switch|component|property|function|do|try|catch|in|continue|for|return|while|required|any|array|binary|boolean|component|date|guid|numeric|query|string|struct|uuid|case)\bz(true|false|null)\bzD(application|session|client|cookie|super|this|variables|arguments)\bz([a-z_$][\w.]*)(\s*)(\()z
[a-z_$][\w.]*z[()\[\]{};:,.\\]z\s+z""z#.+?#z[^"#]+rÆz#pop)r’rÇN)r†r‡rˆr‰rŠrŒr•rrŽÚ
IGNORECASEr˜rrr²rrrœr rr›rrr™rrršZInterprrjrjrjrkrPÇsB
c
@sØeZdZdZdZdgZgZgZdefe	dƒdefgde
jdfd	e
fd
ej
dfdeej
eeƒej
ƒfd
eej
eeƒej
ƒfgdefdeeeeƒeƒfdej
dfe	dƒdefdefgde
jdfde
jdfde
jfgdœZdS)ÚColdfusionMarkupLexerz 
    Coldfusion markup only
    Z
ColdfusionZcfz[^<]+Útagsz<[^<>]*z<!---Ú	cfcommentz(?s)<!--.*?-->z
<cfoutput.*?>Úcfoutputz((?s)(<cfscript.*?>)(.+?)(</cfscript.*?>)zì(?s)(</?cf(?:component|include|if|else|elseif|loop|return|dbinfo|dump|abort|location|invoke|throw|file|savecontent|mailpart|mail|header|content|zip|image|lock|argument|try|catch|break|directory|http|set|function|param)\b)(.*?)((?<!\\)>)z[^#<]+z(#)(.*?)(#)z</cfoutput.*?>z#popz(?s)<[^<>]*rÆz#pushz--->z([^<-]|<(?!!---)|-(?!-->))+)r’rÊrÌrËN)r†r‡rˆr‰rŠrŒr•rr!rrr²rr¯rrrPrrrjrjrjrkrÉ÷s2




rÉcs8eZdZdZdZdgZddgZdgZ‡fdd„Z‡Z	S)	rQz#
    Coldfusion markup in html
    zColdfusion HTMLZcfmz*.cfmz*.cfmlzapplication/x-coldfusioncstƒjttf|ŽdS)N)r¥rgrrÉ)rhri)r¦rjrkrg.szColdfusionHtmlLexer.__init__)
r†r‡rˆr‰rŠrŒr•rrgr¨rjrj)r¦rkrQ%scs4eZdZdZdZdgZdgZgZ‡fdd„Z‡Z	S)rRzH
    Coldfusion markup/script components

    .. versionadded:: 2.0
    zColdfusion CFCZcfcz*.cfccstƒjttf|ŽdS)N)r¥rgrQrP)rhri)r¦rjrkrg=szColdfusionCFCLexer.__init__)
r†r‡rˆr‰rŠrŒr•rrgr¨rjrj)r¦rkrR2scs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
rVzD
    Lexer for Scalate Server Pages.

    .. versionadded:: 1.4
    zScalate Server PageZsspz*.sspzapplication/x-sspcstƒjttf|ŽdS)N)r¥rgrrÂ)rhri)r¦rjrkrgLszSspLexer.__init__cCsDd}tjd|ƒr|d7}t|ƒr(|d7}d|kr@d|kr@|d7}|S)Ngzval \w+\s*:g333333ã?gš™™™™™É?z<%z%>gš™™™™™¹?)rŽr“r$)r~r”rjrjrkr…OszSspLexer.analyse_text)r†r‡rˆr‰rŠrŒr•rrgr…r¨rjrj)r¦rkrVAsc@s@eZdZdZdedfdefdefgdedfdeeƒfgd	œZd
S)ÚTeaTemplateRootLexerz
    Base for the `TeaTemplateLexer`. Yields `Token.Other` for area outside of
    code blocks.

    .. versionadded:: 1.5
    z<%\S?rÃz[^<]+rÄz%>z#popz[\w\W]+?(?=%>|\Z))r’rÃN)	r†r‡rˆr‰rr!rrrrjrjrjrkrÍZsrÍcs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
rWzW
    Lexer for `Tea Templates <http://teatrove.org/>`_.

    .. versionadded:: 1.5
    ZTeaZteaz*.teaz
text/x-teacstƒjttf|ŽdS)N)r¥rgrrÍ)rhri)r¦rjrkrg{szTeaTemplateLexer.__init__cCs:tj|ƒd}t|ƒr|d7}d|kr6d|kr6|d7}|S)Ng{®Gáz„?gš™™™™™Ù?z<%z%>gš™™™™™¹?)rr…r$)r~r”rjrjrkr…~szTeaTemplateLexer.analyse_text)r†r‡rˆr‰rŠrŒr•rrgr…r¨rjrj)r¦rkrWpscsPeZdZdZdZdgZdddddd	d
dgZdd
dgZ‡fdd„Zdd„Z	‡Z
S)rXz¯
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `HtmlLexer`.

    Nested JavaScript and CSS is also highlighted.

    .. versionadded:: 1.6
    z
HTML+Lassoz
html+lassoz*.htmlz*.htmz*.xhtmlz*.lassoz*.lasso[89]z*.inclz*.incz*.lasztext/html+lassozapplication/x-httpd-lassozapplication/x-httpd-lasso[89]cstƒjttf|ŽdS)N)r¥rgrr)rhri)r¦rjrkrg™szLassoHtmlLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gà?)rr…r#)r~r”rjrjrkr…œszLassoHtmlLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkrX‡s

csHeZdZdZdZdgZdddddd	gZd
gZ‡fdd„Zd
d„Z	‡Z
S)rYzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `XmlLexer`.

    .. versionadded:: 1.6
    z	XML+Lassoz	xml+lassoz*.xmlz*.lassoz*.lasso[89]z*.inclz*.incz*.laszapplication/xml+lassocstƒjttf|ŽdS)N)r¥rgrr)rhri)r¦rjrkrg±szLassoXmlLexer.__init__cCs"tj|ƒd}t|ƒr|d7}|S)Ng{®Gáz„?gš™™™™™Ù?)rr…r$)r~r”rjrjrkr…´szLassoXmlLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkrY£s
cs>eZdZdZdZdgZdgZdgZ‡fdd„Zdd	„Z	‡Z
S)
rZzz
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `CssLexer`.

    .. versionadded:: 1.6
    z	CSS+Lassoz	css+lassoz*.cssztext/css+lassocsd|d<tƒjttf|ŽdS)NTÚrequiredelimiters)r¥rgrr)rhri)r¦rjrkrgÈszLassoCssLexer.__init__cCs6tj|ƒd}tjd|ƒr"|d7}d|kr2|d7}|S)Ngš™™™™™©?z
\w+:[^;]+;gš™™™™™¹?zpadding:)rr…rŽr“)r~r”rjrjrkr…ÌszLassoCssLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkrZ»scsDeZdZdZdZddgZdgZdddgZ‡fd	d
„Zdd„Z	‡Z
S)
r[z
    Subclass of the `LassoLexer` which highlights unhandled data with the
    `JavascriptLexer`.

    .. versionadded:: 1.6
    zJavaScript+Lassozjavascript+lassozjs+lassoz*.jszapplication/x-javascript+lassoztext/x-javascript+lassoztext/javascript+lassocsd|d<tƒjttf|ŽdS)NTrÎ)r¥rgrr)rhri)r¦rjrkrgäszLassoJavascriptLexer.__init__cCstj|ƒd}|S)Ngš™™™™™©?)rr…)r~r”rjrjrkr…èsz!LassoJavascriptLexer.analyse_text)r†r‡rˆr‰rŠrŒr§rrgr…r¨rjrj)r¦rkr[Õsc
@sJeZdZdZdZdZdgZdefdefde	ej
eƒdfd	e	eje
je
jƒdfd
e	ejeƒdfgdefdej
d
fde	e
ejƒd
fde	ejeƒfde	eeeƒfde	eeejƒfde	eeeƒdfedƒgdefded
fde	eeejeƒfde	eeeeddƒfdejfedƒgdejfdejfdejfgedƒdejfdejfd e
fgd!œZd"S)#r\zÌ
    Generic handlebars template lexer.

    Highlights only the Handlebars template tags (stuff between `{{` and `}}`).
    Everything else is left for a delegating lexer.

    .. versionadded:: 2.0
    Z
Handlebarszhttps://handlebarsjs.com/Z
handlebarsz[^{]+z\{\{!.*\}\}z
(\{\{\{)(\s*)rƒz(\{\{)([#~/]+)([^\s}]*)z(\{\{)(\s*)z\s+z\}\}\}z#popz
(~?)(\}\})z([^\s}]+)(=)z(>)(\s*)(@partial-block)z(#?>)(\s*)([\w-]+)z(>)(\s*)(\()zdynamic-partialÚgenericz\)z(lookup)(\s+)(\.|this)(\s+)z(lookup)(\s+)(\S+)r )r€z[\w-]+z[()/@a-zA-Z][\w-]*z\.[\w-]+z(this\/|\.\/|(\.\.\/)+)[\w-]+z:?"(\\\\|\\[^\\]|[^"\\])*"z:?'(\\\\|\\[^\\]|[^'\\])*'z>[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?)r’rƒzdynamic-partialr rÏN)r†r‡rˆr‰rŠr‹rŒr!rrÚSpecialrr{r ržrrrršrrrrr™rrœrrrjrjrjrkr\ísF


cs:eZdZdZdZdgZddgZddgZ‡fdd	„Z‡Z	S)
r]z}
    Subclass of the `HandlebarsLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML+Handlebarszhtml+handlebarsz*.handlebarsz*.hbsztext/html+handlebarsztext/x-handlebars-templatecstƒjttf|ŽdS)N)r¥rgrr\)rhri)r¦rjrkrgGszHandlebarsHtmlLexer.__init__)
r†r‡rˆr‰rŠrŒr•rrgr¨rjrj)r¦rkr]:scsDeZdZdZdZdddgZdddd	d
gZddgZ‡fd
d„Z‡Z	S)r^z¦
    Subclass of the `DjangoLexer` that highlights unlexed data with the
    `YamlLexer`.

    Commonly used in Saltstack salt states.

    .. versionadded:: 2.0
    z
YAML+Jinjaz
yaml+jinjaZsaltZslsz*.slsz	*.yaml.j2z*.yml.j2z
*.yaml.jinja2z*.yml.jinja2ztext/x-yaml+jinjaz
text/x-slscstƒjttf|ŽdS)N)r¥rgrr3)rhri)r¦rjrkrgZszYamlJinjaLexer.__init__)
r†r‡rˆr‰rŠrŒr•rrgr¨rjrj)r¦rkr^Ks
c@sneZdZdZdZdZdgZdgZdefde	e
eƒdfde	e
eee
d	d
ƒdfdefgd
ejdfde	ejeƒeddd	ƒfde	ejee
ƒdfde	ejeee
dd
ee
ƒdfde	ejee
ƒdfde	ejee
ƒdfde	ejdee
ƒdfde	ejdee
ƒdfde	ejeee
d	d
e
eƒdfde	ejeƒd fg
edƒd!e
dfd"e
d#fgedƒd!e
dEfd$e	eje
eƒd%fgd"e
dfed&ƒed'ƒgedƒedƒd(e	ee
d	d
eeeee
d	d
ee
ƒfd)efd*ejfd+e	ee
d	d
eejeee
d	d
ƒfed	ƒedƒged	ƒed,ƒgd-e	eedeƒdfd.e	eejeƒdfgd!e
dfgd/e
dFfgd0edfgedƒd1e	ejeeƒfd2e	e
eee
dd
ee
ƒfed3ƒed4ƒed5ƒd6e
fged7ƒd8efged7ƒedƒd8efgd/e
dGfed'ƒgd/e
dHfed9ƒgd:ejfgd;ejfd<e
fgd=ejfd>ejfgd?ejfd@ejfged5ƒed3ƒed4ƒedƒgdAefgdBe	e
eejee
ƒdIfd8e fgdefdCe	e
eejee
ƒdfdefgdDœZ!dS)Jr_z@
    Lexer for Liquid templates.

    .. versionadded:: 2.0
    Zliquidz.https://www.rubydoc.info/github/Shopify/liquidz*.liquidz[^{]+z
(\{%)(\s*)ztag-or-blockz(\{\{)(\s*)([^\s}]+)rÏ)r€Úoutputz\{z(if|unless|elsif|case)(?=\s+)Ú	conditionz(when)(\s+)zend-of-blockÚ
whitespacez(else)(\s*)(%\})ú#popz!(capture)(\s+)([^\s%]+)(\s*)(%\})r z(comment)(\s*)(%\})rÅz(raw)(\s*)(%\})Úrawz(end(case|unless|if))(\s*)(%\})Nz(end([^\s%]+))(\s*)(%\})z"(cycle)(\s+)(?:([^\s:]*)(:))?(\s*)zvariable-tag-markupz([^\s%]+)(\s*)z
tag-markupz\}\}z\|Úfiltersz([^\s|:]+)(:?)(\s*)z
filter-markupz
end-of-tagzdefault-param-markupz/([^\s=!><]+)(\s*)([=!><]=?)(\s*)(\S+)(\s*)(%\})z\b!z\bnot\bz*([\w.\'"]+)(\s+)(contains)(\s+)([\w.\'"]+)zend-at-whitespacez(\s*)((=|!|>|<)=?)(\s*)z(\s*)(\bcontains\b)(\s*)z%\}z\s+z([^\s=:]+)(\s*)(=|:)z(\{\{)(\s*)([^\s}])(\s*)(\}\})rÇÚnumberÚkeywordú,zparam-markupr¬zvariable-param-markupz\b(false|true)\bz[a-zA-Z_]\w*z(?<=\w)\.(?=\w)z'[^']*'z"[^"]*"z\d+\.\d+z\d+z[ \t]+z (\{%)(\s*)(endcomment)(\s*)(%\})z(\{%)(\s*)(endraw)(\s*)(%\}))r’ztag-or-blockrÑrÖz
filter-markuprÒz
generic-valueÚoperatorz
end-of-tagzend-of-blockzend-at-whitespacezparam-markupzdefault-param-markupzvariable-param-markupz
tag-markupzvariable-tag-markuprØr rÇr×rÏrÓrÅrÕ)rÔrÔ)rÔrÔ)rÔrÔ)rÔrÔ)rÔrÔ)"r†r‡rˆr‰rŠr‹rŒr•rrrrrrrZReservedrrr°rr™rÚWordržr›ršrrrœr ZFloatZIntegerrrrjrjrjrkr_^sÐ








c@s¢eZdZdZdZdgZdgZejej	BZ
dZdZdedZ
ee
Zd	efd
ejdfdefd
eejeeeejeejeeeejƒfdeejeeeejeejeeeejƒfdeeejeeeejƒdfdeejeeƒdfdefgdeeeeejƒfdeeeeeeejƒfdejfdefdejfeejfdeejfdefdejfdejfdefdefgdefdeeejƒd fed!ƒgdefd"eeejƒd fed!ƒd#e fgd$œZ!d%S)&r`z¯
    Twig template lexer.

    It just highlights Twig code between the preprocessor directives,
    other data is left untouched by the lexer.

    .. versionadded:: 2.0
    ZTwigZtwigzapplication/x-twigz[\\\w-]|[^\x00-\x7f]z(?:[\\_a-z]|[^\x00-\x7f])z(?:z)*z[^{]+z\{\{r©z\{\#.*?\#\}zB(\{%)(-?\s*)(raw)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endraw)(\s*-?)(%\})zL(\{%)(-?\s*)(verbatim)(\s*-?)(%\})(.*?)(\{%)(-?\s*)(endverbatim)(\s*-?)(%\})z(\{%%)(-?\s*)(filter)(\s+)(%s)rƒz(\{%)(-?\s*)([a-zA-Z_]\w*)z\{z
(\|)(\s*)(%s)z(is)(\s+)(not)?(\s*)(%s)z(?i)(true|false|none|null)\bz–(in|not|and|b-and|or|b-or|b-xor|isif|elseif|else|importconstant|defined|divisibleby|empty|even|iterable|odd|sameasmatches|starts\s+with|ends\s+with)\bz(loop|block|parent)\bz\.z\.[0-9]+z:?"(\\\\|\\[^\\]|[^"\\])*"z:?'(\\\\|\\[^\\]|[^'\\])*'z4([{}()\[\]+\-*/,:~%]|\.\.|\?|:|\*\*|\/\/|!=|[><=]=?)z>[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?z\s+z
(-?)(\}\})z#popr«z	(-?)(%\})r¬)r’r«r©rƒN)"r†r‡rˆr‰rŠrŒrrŽrr­r˜Z_ident_charZ_ident_beginZ
_ident_endZ_ident_innerr!rr{rrrrr™rr®r¯ršr rrœrrrrrjrjrjrkr`,sb
cs6eZdZdZdZdgZdgZdgZ‡fdd„Z‡Z	S)razw
    Subclass of the `TwigLexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    z	HTML+Twigz	html+twigz*.twigztext/html+twigcstƒjttf|ŽdS)N)r¥rgrr`)rhri)r¦rjrkrgŒszTwigHtmlLexer.__init__)
r†r‡rˆr‰rŠrŒr•rrgr¨rjrj)r¦rkrasc@sþeZdZdZdZdZdgZdefdee	j
eƒdfdeee
jeeeeƒd	fd
eee
jeeƒfdeee
jeeeƒd	fdeee
jeƒfgd
efde	j
dfdejfdejfdejfdefde
jfde
jfdeeeeeeeeeƒfg	dedfdedfdedfgdœZdS)rba
    Generic angular2 template lexer.

    Highlights only the Angular template tags (stuff between `{{` and `}}` and
    special attributes: '(event)=', '[property]=', '[(twoWayBinding)]=').
    Everything else is left for a delegating lexer.

    .. versionadded:: 2.1
    ZAngular2z(https://angular.io/guide/template-syntaxZng2z	[^{([*#]+z(\{\{)(\s*)ÚngExpressionz&([([]+)([\w:.-]+)([\])]+)(\s*)(=)(\s*)r´z([([]+)([\w:.-]+)([\])]+)(\s*)z([*#])([\w:.-]+)(\s*)(=)(\s*)z([*#])([\w:.-]+)(\s*)z\s+(\|\s+)?z\}\}z#popz:?(true|false)z:?"(\\\\|\\[^\\]|[^"\\])*"z:?'(\\\\|\\[^\\]|[^'\\])*'z>[0-9](\.[0-9]*)?(eE[+-][0-9])?[flFLdD]?|0[xX][0-9a-fA-F]+[Ll]?z[a-zA-Z][\w-]*(\(.*\))?z\.[\w-]+(\(.*\))?z-(\?)(\s*)([^}\s]+)(\s*)(:)(\s*)([^}\s]+)(\s*)z".*?"z'.*?'z[^\s>]+)r’rÜr´N)r†r‡rˆr‰rŠr‹rŒr!rrr{rrrržrrÚBooleanrœrr ršrrjrjrjrkrbs:	
cs0eZdZdZdZdgZdgZ‡fdd„Z‡ZS)rcz{
    Subclass of the `Angular2Lexer` that highlights unlexed data with the
    `HtmlLexer`.

    .. versionadded:: 2.0
    zHTML + Angular2zhtml+ng2z*.ng2cstƒjttf|ŽdS)N)r¥rgrrb)rhri)r¦rjrkrgÛszAngular2HtmlLexer.__init__)	r†r‡rˆr‰rŠrŒr•rgr¨rjrj)r¦rkrcÏs
cs<eZdZdZdZdgZdddgZ‡fdd„Zd	d
„Z‡Z	S)rdz:
    Templated SQL lexer.

    .. versionadded:: 2.13
    z	SQL+Jinjaz	sql+jinjaz*.sqlz*.sql.j2z*.sql.jinja2cstƒjttf|ŽdS)N)r¥rgr
r3)rhri)r¦rjrkrgêszSqlJinjaLexer.__init__cCsHd}tjd|ƒr|d7}tjd|ƒr,|d7}tjd|tjƒrD|d7}|S)Ngz\{\{\s*ref\(.*\)\s*\}\}gš™™™™™Ù?z\{\{\s*source\(.*\)\s*\}\}gÐ?z?\{%-?\s*macro \w+\(.*\)\s*-?%\}\s+.*\s+\{%-?\s*endmacro\s*-?%\}g333333Ã?)rŽr“r­)r~r”rjrjrkr…íszSqlJinjaLexer.analyse_text)
r†r‡rˆr‰rŠrŒr•rgr…r¨rjrj)r¦rkrdßs
)wr‰rŽZpygments.lexers.htmlrrZpygments.lexers.javascriptrrZpygments.lexers.cssrZpygments.lexers.phprZpygments.lexers.pythonrZpygments.lexers.perlr	Zpygments.lexers.jvmr
rZpygments.lexers.datarZpygments.lexers.sqlr
Zpygments.lexerrrrrrrrrrZpygments.tokenrrrrrrrrrr r!r"Z
pygments.utilr#r$Ú__all__r)r.rSrTrUr3r=r>r?rAr@rBrCrDrErFrGrµrIrJrKrLr:r»r9r8r<r;r*r+r,r-r%r&r'r(r/r0r1r2r4r6r5r7rÂrHrMrNrOrPrÉrQrRrVrÍrWrXrYrZr[r\r]r^r_r`rarbrcrdrjrjrjrkÚ<module>	sÐ,8_9SS/7C
,#@90.
MOS?