pygments.rb 2.3.1 → 2.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -1
- data/.rubocop.yml +7 -0
- data/CHANGELOG.adoc +4 -0
- data/README.adoc +1 -1
- data/bench.rb +1 -1
- data/lib/pygments/popen.rb +3 -7
- data/lib/pygments/version.rb +1 -1
- data/pygments.rb.gemspec +2 -2
- data/test/test_pygments.rb +0 -19
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/AUTHORS +21 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/LICENSE +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/METADATA +19 -11
- data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +614 -0
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/WHEEL +1 -1
- data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/entry_points.txt +0 -1
- data/vendor/pygments-main/bin/pygmentize +1 -1
- data/vendor/pygments-main/pygments/__init__.py +20 -22
- data/vendor/pygments-main/pygments/__main__.py +1 -1
- data/vendor/pygments-main/pygments/cmdline.py +74 -8
- data/vendor/pygments-main/pygments/console.py +1 -1
- data/vendor/pygments-main/pygments/filter.py +1 -1
- data/vendor/pygments-main/pygments/filters/__init__.py +6 -3
- data/vendor/pygments-main/pygments/formatter.py +41 -11
- data/vendor/pygments-main/pygments/formatters/__init__.py +21 -16
- data/vendor/pygments-main/pygments/formatters/_mapping.py +5 -65
- data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
- data/vendor/pygments-main/pygments/formatters/groff.py +170 -0
- data/vendor/pygments-main/pygments/formatters/html.py +54 -32
- data/vendor/pygments-main/pygments/formatters/img.py +9 -5
- data/vendor/pygments-main/pygments/formatters/irc.py +6 -33
- data/vendor/pygments-main/pygments/formatters/latex.py +24 -14
- data/vendor/pygments-main/pygments/formatters/other.py +1 -1
- data/vendor/pygments-main/pygments/formatters/pangomarkup.py +1 -1
- data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
- data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
- data/vendor/pygments-main/pygments/formatters/terminal.py +1 -3
- data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -4
- data/vendor/pygments-main/pygments/lexer.py +101 -32
- data/vendor/pygments-main/pygments/lexers/__init__.py +50 -29
- data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +103 -0
- data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
- data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +21 -6
- data/vendor/pygments-main/pygments/lexers/_css_builtins.py +558 -0
- data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +10 -0
- data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +4932 -0
- data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +11 -18
- data/vendor/pygments-main/pygments/lexers/_mapping.py +71 -82
- data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +58 -4
- data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_php_builtins.py +408 -1835
- data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +70 -8
- data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +666 -0
- data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1609 -0
- data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3 -3
- data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +9 -18
- data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +185 -94
- data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
- data/vendor/pygments-main/pygments/lexers/actionscript.py +15 -14
- data/vendor/pygments-main/pygments/lexers/ada.py +144 -0
- data/vendor/pygments-main/pygments/lexers/agile.py +1 -1
- data/vendor/pygments-main/pygments/lexers/algebra.py +72 -9
- data/vendor/pygments-main/pygments/lexers/ambient.py +8 -7
- data/vendor/pygments-main/pygments/lexers/amdgpu.py +4 -3
- data/vendor/pygments-main/pygments/lexers/ampl.py +10 -8
- data/vendor/pygments-main/pygments/lexers/apdlexer.py +164 -20
- data/vendor/pygments-main/pygments/lexers/apl.py +6 -5
- data/vendor/pygments-main/pygments/lexers/archetype.py +23 -21
- data/vendor/pygments-main/pygments/lexers/arrow.py +10 -9
- data/vendor/pygments-main/pygments/lexers/arturo.py +250 -0
- data/vendor/pygments-main/pygments/lexers/asc.py +9 -5
- data/vendor/pygments-main/pygments/lexers/asm.py +68 -63
- data/vendor/pygments-main/pygments/lexers/automation.py +7 -5
- data/vendor/pygments-main/pygments/lexers/bare.py +20 -21
- data/vendor/pygments-main/pygments/lexers/basic.py +45 -41
- data/vendor/pygments-main/pygments/lexers/bdd.py +58 -0
- data/vendor/pygments-main/pygments/lexers/berry.py +99 -0
- data/vendor/pygments-main/pygments/lexers/bibtex.py +6 -6
- data/vendor/pygments-main/pygments/lexers/boa.py +4 -8
- data/vendor/pygments-main/pygments/lexers/business.py +18 -18
- data/vendor/pygments-main/pygments/lexers/c_cpp.py +80 -40
- data/vendor/pygments-main/pygments/lexers/c_like.py +21 -19
- data/vendor/pygments-main/pygments/lexers/capnproto.py +6 -8
- data/vendor/pygments-main/pygments/lexers/carbon.py +96 -0
- data/vendor/pygments-main/pygments/lexers/cddl.py +16 -33
- data/vendor/pygments-main/pygments/lexers/chapel.py +14 -9
- data/vendor/pygments-main/pygments/lexers/clean.py +3 -2
- data/vendor/pygments-main/pygments/lexers/comal.py +80 -0
- data/vendor/pygments-main/pygments/lexers/compiled.py +3 -2
- data/vendor/pygments-main/pygments/lexers/configs.py +235 -120
- data/vendor/pygments-main/pygments/lexers/console.py +5 -4
- data/vendor/pygments-main/pygments/lexers/cplint.py +44 -0
- data/vendor/pygments-main/pygments/lexers/crystal.py +22 -23
- data/vendor/pygments-main/pygments/lexers/csound.py +19 -17
- data/vendor/pygments-main/pygments/lexers/css.py +67 -159
- data/vendor/pygments-main/pygments/lexers/d.py +15 -12
- data/vendor/pygments-main/pygments/lexers/dalvik.py +14 -11
- data/vendor/pygments-main/pygments/lexers/data.py +119 -49
- data/vendor/pygments-main/pygments/lexers/dax.py +136 -0
- data/vendor/pygments-main/pygments/lexers/devicetree.py +9 -8
- data/vendor/pygments-main/pygments/lexers/diff.py +23 -19
- data/vendor/pygments-main/pygments/lexers/dotnet.py +216 -81
- data/vendor/pygments-main/pygments/lexers/dsls.py +86 -64
- data/vendor/pygments-main/pygments/lexers/dylan.py +16 -15
- data/vendor/pygments-main/pygments/lexers/ecl.py +46 -38
- data/vendor/pygments-main/pygments/lexers/eiffel.py +15 -10
- data/vendor/pygments-main/pygments/lexers/elm.py +12 -8
- data/vendor/pygments-main/pygments/lexers/elpi.py +165 -0
- data/vendor/pygments-main/pygments/lexers/email.py +21 -39
- data/vendor/pygments-main/pygments/lexers/erlang.py +21 -22
- data/vendor/pygments-main/pygments/lexers/esoteric.py +28 -30
- data/vendor/pygments-main/pygments/lexers/ezhil.py +10 -9
- data/vendor/pygments-main/pygments/lexers/factor.py +104 -83
- data/vendor/pygments-main/pygments/lexers/fantom.py +31 -29
- data/vendor/pygments-main/pygments/lexers/felix.py +18 -14
- data/vendor/pygments-main/pygments/lexers/fift.py +67 -0
- data/vendor/pygments-main/pygments/lexers/floscript.py +7 -7
- data/vendor/pygments-main/pygments/lexers/forth.py +8 -6
- data/vendor/pygments-main/pygments/lexers/fortran.py +16 -11
- data/vendor/pygments-main/pygments/lexers/foxpro.py +2 -2
- data/vendor/pygments-main/pygments/lexers/freefem.py +7 -10
- data/vendor/pygments-main/pygments/lexers/func.py +108 -0
- data/vendor/pygments-main/pygments/lexers/functional.py +1 -1
- data/vendor/pygments-main/pygments/lexers/futhark.py +12 -17
- data/vendor/pygments-main/pygments/lexers/gcodelexer.py +1 -2
- data/vendor/pygments-main/pygments/lexers/gdscript.py +76 -233
- data/vendor/pygments-main/pygments/lexers/go.py +12 -14
- data/vendor/pygments-main/pygments/lexers/grammar_notation.py +22 -26
- data/vendor/pygments-main/pygments/lexers/graph.py +36 -15
- data/vendor/pygments-main/pygments/lexers/graphics.py +37 -38
- data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -1
- data/vendor/pygments-main/pygments/lexers/gsql.py +39 -27
- data/vendor/pygments-main/pygments/lexers/haskell.py +73 -71
- data/vendor/pygments-main/pygments/lexers/haxe.py +13 -11
- data/vendor/pygments-main/pygments/lexers/hdl.py +31 -34
- data/vendor/pygments-main/pygments/lexers/hexdump.py +21 -21
- data/vendor/pygments-main/pygments/lexers/html.py +11 -19
- data/vendor/pygments-main/pygments/lexers/idl.py +10 -5
- data/vendor/pygments-main/pygments/lexers/igor.py +3 -2
- data/vendor/pygments-main/pygments/lexers/inferno.py +9 -8
- data/vendor/pygments-main/pygments/lexers/installers.py +39 -33
- data/vendor/pygments-main/pygments/lexers/int_fiction.py +35 -20
- data/vendor/pygments-main/pygments/lexers/iolang.py +9 -9
- data/vendor/pygments-main/pygments/lexers/j.py +20 -13
- data/vendor/pygments-main/pygments/lexers/javascript.py +183 -149
- data/vendor/pygments-main/pygments/lexers/jmespath.py +68 -0
- data/vendor/pygments-main/pygments/lexers/jslt.py +4 -3
- data/vendor/pygments-main/pygments/lexers/jsonnet.py +168 -0
- data/vendor/pygments-main/pygments/lexers/julia.py +44 -32
- data/vendor/pygments-main/pygments/lexers/jvm.py +161 -140
- data/vendor/pygments-main/pygments/lexers/kuin.py +93 -59
- data/vendor/pygments-main/pygments/lexers/lilypond.py +226 -0
- data/vendor/pygments-main/pygments/lexers/lisp.py +244 -107
- data/vendor/pygments-main/pygments/lexers/macaulay2.py +1739 -0
- data/vendor/pygments-main/pygments/lexers/make.py +21 -16
- data/vendor/pygments-main/pygments/lexers/markup.py +752 -11
- data/vendor/pygments-main/pygments/lexers/math.py +1 -1
- data/vendor/pygments-main/pygments/lexers/matlab.py +18 -3
- data/vendor/pygments-main/pygments/lexers/maxima.py +85 -0
- data/vendor/pygments-main/pygments/lexers/meson.py +10 -25
- data/vendor/pygments-main/pygments/lexers/mime.py +2 -2
- data/vendor/pygments-main/pygments/lexers/minecraft.py +394 -0
- data/vendor/pygments-main/pygments/lexers/mips.py +128 -0
- data/vendor/pygments-main/pygments/lexers/ml.py +9 -6
- data/vendor/pygments-main/pygments/lexers/modeling.py +12 -8
- data/vendor/pygments-main/pygments/lexers/modula2.py +3 -2
- data/vendor/pygments-main/pygments/lexers/monte.py +3 -2
- data/vendor/pygments-main/pygments/lexers/mosel.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ncl.py +1 -1
- data/vendor/pygments-main/pygments/lexers/nimrod.py +62 -20
- data/vendor/pygments-main/pygments/lexers/nit.py +3 -2
- data/vendor/pygments-main/pygments/lexers/nix.py +5 -5
- data/vendor/pygments-main/pygments/lexers/oberon.py +2 -2
- data/vendor/pygments-main/pygments/lexers/objective.py +6 -4
- data/vendor/pygments-main/pygments/lexers/ooc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/other.py +1 -1
- data/vendor/pygments-main/pygments/lexers/parasail.py +3 -2
- data/vendor/pygments-main/pygments/lexers/parsers.py +23 -21
- data/vendor/pygments-main/pygments/lexers/pascal.py +196 -198
- data/vendor/pygments-main/pygments/lexers/pawn.py +1 -1
- data/vendor/pygments-main/pygments/lexers/perl.py +17 -15
- data/vendor/pygments-main/pygments/lexers/phix.py +364 -0
- data/vendor/pygments-main/pygments/lexers/php.py +35 -20
- data/vendor/pygments-main/pygments/lexers/pointless.py +3 -2
- data/vendor/pygments-main/pygments/lexers/pony.py +1 -1
- data/vendor/pygments-main/pygments/lexers/praat.py +41 -38
- data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
- data/vendor/pygments-main/pygments/lexers/prolog.py +7 -8
- data/vendor/pygments-main/pygments/lexers/promql.py +5 -12
- data/vendor/pygments-main/pygments/lexers/python.py +145 -119
- data/vendor/pygments-main/pygments/lexers/q.py +188 -0
- data/vendor/pygments-main/pygments/lexers/qlik.py +117 -0
- data/vendor/pygments-main/pygments/lexers/qvt.py +1 -1
- data/vendor/pygments-main/pygments/lexers/r.py +4 -4
- data/vendor/pygments-main/pygments/lexers/rdf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/rebol.py +1 -12
- data/vendor/pygments-main/pygments/lexers/resource.py +1 -1
- data/vendor/pygments-main/pygments/lexers/ride.py +3 -2
- data/vendor/pygments-main/pygments/lexers/rita.py +43 -0
- data/vendor/pygments-main/pygments/lexers/rnc.py +3 -2
- data/vendor/pygments-main/pygments/lexers/roboconf.py +3 -3
- data/vendor/pygments-main/pygments/lexers/robotframework.py +6 -5
- data/vendor/pygments-main/pygments/lexers/ruby.py +24 -24
- data/vendor/pygments-main/pygments/lexers/rust.py +3 -2
- data/vendor/pygments-main/pygments/lexers/sas.py +2 -2
- data/vendor/pygments-main/pygments/lexers/savi.py +170 -0
- data/vendor/pygments-main/pygments/lexers/scdoc.py +4 -7
- data/vendor/pygments-main/pygments/lexers/scripting.py +24 -21
- data/vendor/pygments-main/pygments/lexers/sgf.py +6 -6
- data/vendor/pygments-main/pygments/lexers/shell.py +29 -21
- data/vendor/pygments-main/pygments/lexers/sieve.py +14 -4
- data/vendor/pygments-main/pygments/lexers/slash.py +1 -1
- data/vendor/pygments-main/pygments/lexers/smalltalk.py +5 -3
- data/vendor/pygments-main/pygments/lexers/smithy.py +5 -6
- data/vendor/pygments-main/pygments/lexers/smv.py +1 -1
- data/vendor/pygments-main/pygments/lexers/snobol.py +1 -1
- data/vendor/pygments-main/pygments/lexers/solidity.py +3 -7
- data/vendor/pygments-main/pygments/lexers/sophia.py +103 -0
- data/vendor/pygments-main/pygments/lexers/special.py +2 -5
- data/vendor/pygments-main/pygments/lexers/spice.py +71 -0
- data/vendor/pygments-main/pygments/lexers/sql.py +212 -17
- data/vendor/pygments-main/pygments/lexers/srcinfo.py +62 -0
- data/vendor/pygments-main/pygments/lexers/stata.py +4 -3
- data/vendor/pygments-main/pygments/lexers/supercollider.py +4 -3
- data/vendor/pygments-main/pygments/lexers/tal.py +74 -0
- data/vendor/pygments-main/pygments/lexers/tcl.py +21 -16
- data/vendor/pygments-main/pygments/lexers/teal.py +9 -8
- data/vendor/pygments-main/pygments/lexers/templates.py +62 -29
- data/vendor/pygments-main/pygments/lexers/teraterm.py +12 -20
- data/vendor/pygments-main/pygments/lexers/testing.py +6 -2
- data/vendor/pygments-main/pygments/lexers/text.py +3 -2
- data/vendor/pygments-main/pygments/lexers/textedit.py +41 -7
- data/vendor/pygments-main/pygments/lexers/textfmts.py +7 -5
- data/vendor/pygments-main/pygments/lexers/theorem.py +42 -36
- data/vendor/pygments-main/pygments/lexers/thingsdb.py +2 -4
- data/vendor/pygments-main/pygments/lexers/tlb.py +57 -0
- data/vendor/pygments-main/pygments/lexers/tnt.py +3 -4
- data/vendor/pygments-main/pygments/lexers/trafficscript.py +2 -4
- data/vendor/pygments-main/pygments/lexers/typoscript.py +2 -3
- data/vendor/pygments-main/pygments/lexers/ul4.py +267 -0
- data/vendor/pygments-main/pygments/lexers/unicon.py +1 -1
- data/vendor/pygments-main/pygments/lexers/urbi.py +4 -4
- data/vendor/pygments-main/pygments/lexers/usd.py +2 -1
- data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
- data/vendor/pygments-main/pygments/lexers/verification.py +4 -3
- data/vendor/pygments-main/pygments/lexers/web.py +1 -1
- data/vendor/pygments-main/pygments/lexers/webassembly.py +5 -5
- data/vendor/pygments-main/pygments/lexers/webidl.py +2 -1
- data/vendor/pygments-main/pygments/lexers/webmisc.py +90 -71
- data/vendor/pygments-main/pygments/lexers/wgsl.py +407 -0
- data/vendor/pygments-main/pygments/lexers/whiley.py +2 -1
- data/vendor/pygments-main/pygments/lexers/wowtoc.py +120 -0
- data/vendor/pygments-main/pygments/lexers/wren.py +99 -0
- data/vendor/pygments-main/pygments/lexers/x10.py +5 -6
- data/vendor/pygments-main/pygments/lexers/xorg.py +3 -2
- data/vendor/pygments-main/pygments/lexers/yang.py +6 -5
- data/vendor/pygments-main/pygments/lexers/zig.py +3 -2
- data/vendor/pygments-main/pygments/modeline.py +1 -1
- data/vendor/pygments-main/pygments/plugin.py +28 -9
- data/vendor/pygments-main/pygments/regexopt.py +1 -1
- data/vendor/pygments-main/pygments/scanner.py +2 -2
- data/vendor/pygments-main/pygments/sphinxext.py +63 -1
- data/vendor/pygments-main/pygments/style.py +7 -1
- data/vendor/pygments-main/pygments/styles/__init__.py +19 -5
- data/vendor/pygments-main/pygments/styles/abap.py +2 -2
- data/vendor/pygments-main/pygments/styles/algol.py +1 -2
- data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -2
- data/vendor/pygments-main/pygments/styles/arduino.py +2 -3
- data/vendor/pygments-main/pygments/styles/autumn.py +1 -3
- data/vendor/pygments-main/pygments/styles/borland.py +1 -3
- data/vendor/pygments-main/pygments/styles/bw.py +1 -2
- data/vendor/pygments-main/pygments/styles/colorful.py +1 -3
- data/vendor/pygments-main/pygments/styles/default.py +13 -14
- data/vendor/pygments-main/pygments/styles/dracula.py +102 -0
- data/vendor/pygments-main/pygments/styles/emacs.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly.py +1 -2
- data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +75 -0
- data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
- data/vendor/pygments-main/pygments/styles/gh_dark.py +107 -0
- data/vendor/pygments-main/pygments/styles/gruvbox.py +4 -2
- data/vendor/pygments-main/pygments/styles/igor.py +1 -2
- data/vendor/pygments-main/pygments/styles/inkpot.py +3 -2
- data/vendor/pygments-main/pygments/styles/lilypond.py +56 -0
- data/vendor/pygments-main/pygments/styles/lovelace.py +1 -3
- data/vendor/pygments-main/pygments/styles/manni.py +1 -1
- data/vendor/pygments-main/pygments/styles/material.py +1 -2
- data/vendor/pygments-main/pygments/styles/monokai.py +3 -3
- data/vendor/pygments-main/pygments/styles/murphy.py +1 -3
- data/vendor/pygments-main/pygments/styles/native.py +11 -11
- data/vendor/pygments-main/pygments/styles/nord.py +150 -0
- data/vendor/pygments-main/pygments/styles/onedark.py +59 -0
- data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -6
- data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -6
- data/vendor/pygments-main/pygments/styles/pastie.py +1 -3
- data/vendor/pygments-main/pygments/styles/perldoc.py +1 -2
- data/vendor/pygments-main/pygments/styles/rainbow_dash.py +3 -3
- data/vendor/pygments-main/pygments/styles/rrt.py +3 -2
- data/vendor/pygments-main/pygments/styles/sas.py +2 -4
- data/vendor/pygments-main/pygments/styles/solarized.py +1 -1
- data/vendor/pygments-main/pygments/styles/staroffice.py +26 -0
- data/vendor/pygments-main/pygments/styles/stata_dark.py +4 -6
- data/vendor/pygments-main/pygments/styles/stata_light.py +1 -2
- data/vendor/pygments-main/pygments/styles/tango.py +2 -3
- data/vendor/pygments-main/pygments/styles/trac.py +1 -3
- data/vendor/pygments-main/pygments/styles/vim.py +1 -2
- data/vendor/pygments-main/pygments/styles/vs.py +1 -2
- data/vendor/pygments-main/pygments/styles/xcode.py +1 -3
- data/vendor/pygments-main/pygments/styles/zenburn.py +4 -6
- data/vendor/pygments-main/pygments/token.py +2 -1
- data/vendor/pygments-main/pygments/unistring.py +4 -6
- data/vendor/pygments-main/pygments/util.py +27 -5
- metadata +59 -14
- data/vendor/pygments-main/Pygments-2.10.0.dist-info/RECORD +0 -524
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/INSTALLER +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/REQUESTED +0 -0
- /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/top_level.txt +0 -0
@@ -4,29 +4,28 @@
|
|
4
4
|
|
5
5
|
Lexers for the ECL language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
11
|
import re
|
12
12
|
|
13
13
|
from pygments.lexer import RegexLexer, include, bygroups, words
|
14
|
-
from pygments.token import
|
15
|
-
Number, Punctuation
|
14
|
+
from pygments.token import Comment, Operator, Keyword, Name, String, \
|
15
|
+
Number, Punctuation, Whitespace
|
16
16
|
|
17
17
|
__all__ = ['ECLLexer']
|
18
18
|
|
19
19
|
|
20
20
|
class ECLLexer(RegexLexer):
|
21
21
|
"""
|
22
|
-
Lexer for the declarative big-data
|
23
|
-
<https://hpccsystems.com/training/documentation/ecl-language-reference/html>`_
|
24
|
-
language.
|
22
|
+
Lexer for the declarative big-data ECL language.
|
25
23
|
|
26
24
|
.. versionadded:: 1.5
|
27
25
|
"""
|
28
26
|
|
29
27
|
name = 'ECL'
|
28
|
+
url = 'https://hpccsystems.com/training/documentation/ecl-language-reference/html'
|
30
29
|
aliases = ['ecl']
|
31
30
|
filenames = ['*.ecl']
|
32
31
|
mimetypes = ['application/x-ecl']
|
@@ -39,7 +38,7 @@ class ECLLexer(RegexLexer):
|
|
39
38
|
include('statements'),
|
40
39
|
],
|
41
40
|
'whitespace': [
|
42
|
-
(r'\s+',
|
41
|
+
(r'\s+', Whitespace),
|
43
42
|
(r'\/\/.*', Comment.Single),
|
44
43
|
(r'/(\\\n)?\*(.|\n)*?\*(\\\n)?/', Comment.Multiline),
|
45
44
|
],
|
@@ -67,7 +66,7 @@ class ECLLexer(RegexLexer):
|
|
67
66
|
(r'((?:ASCII|BIG_ENDIAN|BOOLEAN|DATA|DECIMAL|EBCDIC|INTEGER|PATTERN|'
|
68
67
|
r'QSTRING|REAL|RECORD|RULE|SET OF|STRING|TOKEN|UDECIMAL|UNICODE|'
|
69
68
|
r'UNSIGNED|VARSTRING|VARUNICODE)\d*)(\s+)',
|
70
|
-
bygroups(Keyword.Type,
|
69
|
+
bygroups(Keyword.Type, Whitespace)),
|
71
70
|
],
|
72
71
|
'keywords': [
|
73
72
|
(words((
|
@@ -80,39 +79,48 @@ class ECLLexer(RegexLexer):
|
|
80
79
|
Keyword.Reserved),
|
81
80
|
# These are classed differently, check later
|
82
81
|
(words((
|
83
|
-
'ALL', 'AND', 'ANY', 'AS', 'ATMOST', 'BEFORE', 'BEGINC++', 'BEST',
|
84
|
-
'
|
85
|
-
'
|
86
|
-
'
|
87
|
-
'
|
88
|
-
'
|
89
|
-
'
|
90
|
-
'
|
91
|
-
'
|
92
|
-
'
|
93
|
-
'
|
94
|
-
'
|
82
|
+
'ALL', 'AND', 'ANY', 'AS', 'ATMOST', 'BEFORE', 'BEGINC++', 'BEST',
|
83
|
+
'BETWEEN', 'CASE', 'CONST', 'COUNTER', 'CSV', 'DESCEND', 'ENCRYPT',
|
84
|
+
'ENDC++', 'ENDMACRO', 'EXCEPT', 'EXCLUSIVE', 'EXPIRE', 'EXPORT',
|
85
|
+
'EXTEND', 'FALSE', 'FEW', 'FIRST', 'FLAT', 'FULL', 'FUNCTION',
|
86
|
+
'GROUP', 'HEADER', 'HEADING', 'HOLE', 'IFBLOCK', 'IMPORT', 'IN',
|
87
|
+
'JOINED', 'KEEP', 'KEYED', 'LAST', 'LEFT', 'LIMIT', 'LOAD', 'LOCAL',
|
88
|
+
'LOCALE', 'LOOKUP', 'MACRO', 'MANY', 'MAXCOUNT', 'MAXLENGTH',
|
89
|
+
'MIN SKEW', 'MODULE', 'INTERFACE', 'NAMED', 'NOCASE', 'NOROOT',
|
90
|
+
'NOSCAN', 'NOSORT', 'NOT', 'OF', 'ONLY', 'OPT', 'OR', 'OUTER',
|
91
|
+
'OVERWRITE', 'PACKED', 'PARTITION', 'PENALTY', 'PHYSICALLENGTH',
|
92
|
+
'PIPE', 'QUOTE', 'RELATIONSHIP', 'REPEAT', 'RETURN', 'RIGHT',
|
93
|
+
'SCAN', 'SELF', 'SEPARATOR', 'SERVICE', 'SHARED', 'SKEW', 'SKIP',
|
94
|
+
'SQL', 'STORE', 'TERMINATOR', 'THOR', 'THRESHOLD', 'TOKEN',
|
95
|
+
'TRANSFORM', 'TRIM', 'TRUE', 'TYPE', 'UNICODEORDER', 'UNSORTED',
|
96
|
+
'VALIDATE', 'VIRTUAL', 'WHOLE', 'WILD', 'WITHIN', 'XML', 'XPATH',
|
97
|
+
'__COMPRESSED__'), suffix=r'\b'),
|
95
98
|
Keyword.Reserved),
|
96
99
|
],
|
97
100
|
'functions': [
|
98
101
|
(words((
|
99
|
-
'ABS', 'ACOS', 'ALLNODES', 'ASCII', 'ASIN', 'ASSTRING', 'ATAN',
|
100
|
-
'
|
101
|
-
'
|
102
|
-
'
|
103
|
-
'
|
104
|
-
'
|
105
|
-
'
|
106
|
-
'
|
107
|
-
'
|
108
|
-
'
|
109
|
-
'
|
110
|
-
'
|
111
|
-
'
|
112
|
-
'
|
113
|
-
'
|
114
|
-
'
|
115
|
-
'
|
102
|
+
'ABS', 'ACOS', 'ALLNODES', 'ASCII', 'ASIN', 'ASSTRING', 'ATAN',
|
103
|
+
'ATAN2', 'AVE', 'CASE', 'CHOOSE', 'CHOOSEN', 'CHOOSESETS',
|
104
|
+
'CLUSTERSIZE', 'COMBINE', 'CORRELATION', 'COS', 'COSH', 'COUNT',
|
105
|
+
'COVARIANCE', 'CRON', 'DATASET', 'DEDUP', 'DEFINE', 'DENORMALIZE',
|
106
|
+
'DISTRIBUTE', 'DISTRIBUTED', 'DISTRIBUTION', 'EBCDIC', 'ENTH',
|
107
|
+
'ERROR', 'EVALUATE', 'EVENT', 'EVENTEXTRA', 'EVENTNAME', 'EXISTS',
|
108
|
+
'EXP', 'FAILCODE', 'FAILMESSAGE', 'FETCH', 'FROMUNICODE',
|
109
|
+
'GETISVALID', 'GLOBAL', 'GRAPH', 'GROUP', 'HASH', 'HASH32',
|
110
|
+
'HASH64', 'HASHCRC', 'HASHMD5', 'HAVING', 'IF', 'INDEX',
|
111
|
+
'INTFORMAT', 'ISVALID', 'ITERATE', 'JOIN', 'KEYUNICODE', 'LENGTH',
|
112
|
+
'LIBRARY', 'LIMIT', 'LN', 'LOCAL', 'LOG', 'LOOP', 'MAP', 'MATCHED',
|
113
|
+
'MATCHLENGTH', 'MATCHPOSITION', 'MATCHTEXT', 'MATCHUNICODE', 'MAX',
|
114
|
+
'MERGE', 'MERGEJOIN', 'MIN', 'NOLOCAL', 'NONEMPTY', 'NORMALIZE',
|
115
|
+
'PARSE', 'PIPE', 'POWER', 'PRELOAD', 'PROCESS', 'PROJECT', 'PULL',
|
116
|
+
'RANDOM', 'RANGE', 'RANK', 'RANKED', 'REALFORMAT', 'RECORDOF',
|
117
|
+
'REGEXFIND', 'REGEXREPLACE', 'REGROUP', 'REJECTED', 'ROLLUP',
|
118
|
+
'ROUND', 'ROUNDUP', 'ROW', 'ROWDIFF', 'SAMPLE', 'SET', 'SIN',
|
119
|
+
'SINH', 'SIZEOF', 'SOAPCALL', 'SORT', 'SORTED', 'SQRT', 'STEPPED',
|
120
|
+
'STORED', 'SUM', 'TABLE', 'TAN', 'TANH', 'THISNODE', 'TOPN',
|
121
|
+
'TOUNICODE', 'TRANSFER', 'TRIM', 'TRUNCATE', 'TYPEOF', 'UNGROUP',
|
122
|
+
'UNICODEORDER', 'VARIANCE', 'WHICH', 'WORKUNIT', 'XMLDECODE',
|
123
|
+
'XMLENCODE', 'XMLTEXT', 'XMLUNICODE'), suffix=r'\b'),
|
116
124
|
Name.Function),
|
117
125
|
],
|
118
126
|
'string': [
|
@@ -124,7 +132,7 @@ class ECLLexer(RegexLexer):
|
|
124
132
|
|
125
133
|
def analyse_text(text):
|
126
134
|
"""This is very difficult to guess relative to other business languages.
|
127
|
-
-> in
|
135
|
+
-> in conjunction with BEGIN/END seems relatively rare though."""
|
128
136
|
result = 0
|
129
137
|
|
130
138
|
if '->' in text:
|
@@ -4,36 +4,41 @@
|
|
4
4
|
|
5
5
|
Lexer for the Eiffel language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
|
-
from pygments.lexer import RegexLexer, include, words
|
12
|
-
from pygments.token import
|
13
|
-
|
11
|
+
from pygments.lexer import RegexLexer, include, words, bygroups
|
12
|
+
from pygments.token import Comment, Operator, Keyword, Name, String, Number, \
|
13
|
+
Punctuation, Whitespace
|
14
14
|
|
15
15
|
__all__ = ['EiffelLexer']
|
16
16
|
|
17
17
|
|
18
18
|
class EiffelLexer(RegexLexer):
|
19
19
|
"""
|
20
|
-
For
|
20
|
+
For Eiffel source code.
|
21
21
|
|
22
22
|
.. versionadded:: 2.0
|
23
23
|
"""
|
24
24
|
name = 'Eiffel'
|
25
|
+
url = 'http://www.eiffel.com'
|
25
26
|
aliases = ['eiffel']
|
26
27
|
filenames = ['*.e']
|
27
28
|
mimetypes = ['text/x-eiffel']
|
28
29
|
|
29
30
|
tokens = {
|
30
31
|
'root': [
|
31
|
-
(r'[^\S\n]+',
|
32
|
-
(r'
|
33
|
-
(r'[^\S\n]+',
|
32
|
+
(r'[^\S\n]+', Whitespace),
|
33
|
+
(r'--.*?$', Comment.Single),
|
34
|
+
(r'[^\S\n]+', Whitespace),
|
34
35
|
# Please note that keyword and operator are case insensitive.
|
35
36
|
(r'(?i)(true|false|void|current|result|precursor)\b', Keyword.Constant),
|
36
|
-
(r'(?i)(
|
37
|
+
(r'(?i)(not|xor|implies|or)\b', Operator.Word),
|
38
|
+
(r'(?i)(and)(?:(\s+)(then))?\b',
|
39
|
+
bygroups(Operator.Word, Whitespace, Operator.Word)),
|
40
|
+
(r'(?i)(or)(?:(\s+)(else))?\b',
|
41
|
+
bygroups(Operator.Word, Whitespace, Operator.Word)),
|
37
42
|
(words((
|
38
43
|
'across', 'agent', 'alias', 'all', 'as', 'assign', 'attached',
|
39
44
|
'attribute', 'check', 'class', 'convert', 'create', 'debug',
|
@@ -52,7 +57,7 @@ class EiffelLexer(RegexLexer):
|
|
52
57
|
(r"([{}():;,.])", Punctuation),
|
53
58
|
(r'([a-z]\w*)|([A-Z][A-Z0-9_]*[a-z]\w*)', Name),
|
54
59
|
(r'([A-Z][A-Z0-9_]*)', Name.Class),
|
55
|
-
(r'\n+',
|
60
|
+
(r'\n+', Whitespace),
|
56
61
|
],
|
57
62
|
'numbers': [
|
58
63
|
(r'0[xX][a-fA-F0-9]+', Number.Hex),
|
@@ -4,24 +4,26 @@
|
|
4
4
|
|
5
5
|
Lexer for the Elm programming language.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
11
|
-
from pygments.lexer import RegexLexer, words, include
|
12
|
-
from pygments.token import Comment, Keyword, Name, Number, Punctuation,
|
11
|
+
from pygments.lexer import RegexLexer, words, include, bygroups
|
12
|
+
from pygments.token import Comment, Keyword, Name, Number, Punctuation, \
|
13
|
+
String, Whitespace
|
13
14
|
|
14
15
|
__all__ = ['ElmLexer']
|
15
16
|
|
16
17
|
|
17
18
|
class ElmLexer(RegexLexer):
|
18
19
|
"""
|
19
|
-
For
|
20
|
+
For Elm source code.
|
20
21
|
|
21
22
|
.. versionadded:: 2.1
|
22
23
|
"""
|
23
24
|
|
24
25
|
name = 'Elm'
|
26
|
+
url = 'http://elm-lang.org/'
|
25
27
|
aliases = ['elm']
|
26
28
|
filenames = ['*.elm']
|
27
29
|
mimetypes = ['text/x-elm']
|
@@ -49,16 +51,18 @@ class ElmLexer(RegexLexer):
|
|
49
51
|
(r'--.*', Comment.Single),
|
50
52
|
|
51
53
|
# Whitespace
|
52
|
-
(r'\s+',
|
54
|
+
(r'\s+', Whitespace),
|
53
55
|
|
54
56
|
# Strings
|
55
57
|
(r'"', String, 'doublequote'),
|
56
58
|
|
57
59
|
# Modules
|
58
|
-
(r'
|
60
|
+
(r'^(\s*)(module)(\s*)', bygroups(Whitespace, Keyword.Namespace,
|
61
|
+
Whitespace), 'imports'),
|
59
62
|
|
60
63
|
# Imports
|
61
|
-
(r'
|
64
|
+
(r'^(\s*)(import)(\s*)', bygroups(Whitespace, Keyword.Namespace,
|
65
|
+
Whitespace), 'imports'),
|
62
66
|
|
63
67
|
# Shaders
|
64
68
|
(r'\[glsl\|.*', Name.Entity, 'shader'),
|
@@ -115,6 +119,6 @@ class ElmLexer(RegexLexer):
|
|
115
119
|
'shader': [
|
116
120
|
(r'\|(?!\])', Name.Entity),
|
117
121
|
(r'\|\]', Name.Entity, '#pop'),
|
118
|
-
(r'
|
122
|
+
(r'(.*)(\n)', bygroups(Name.Entity, Whitespace)),
|
119
123
|
],
|
120
124
|
}
|
@@ -0,0 +1,165 @@
|
|
1
|
+
"""
|
2
|
+
pygments.lexers.elpi
|
3
|
+
~~~~~~~~~~~~~~~~~~~~
|
4
|
+
|
5
|
+
Lexer for the `Elpi <http://github.com/LPCIC/elpi>`_ programming language.
|
6
|
+
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
|
+
:license: BSD, see LICENSE for details.
|
9
|
+
"""
|
10
|
+
|
11
|
+
from pygments.lexer import RegexLexer, bygroups, include
|
12
|
+
from pygments.token import Text, Comment, Operator, Keyword, Name, String, \
|
13
|
+
Number
|
14
|
+
|
15
|
+
__all__ = ['ElpiLexer']
|
16
|
+
|
17
|
+
|
18
|
+
class ElpiLexer(RegexLexer):
|
19
|
+
"""
|
20
|
+
Lexer for the Elpi programming language.
|
21
|
+
|
22
|
+
.. versionadded:: 2.11
|
23
|
+
"""
|
24
|
+
|
25
|
+
name = 'Elpi'
|
26
|
+
url = 'http://github.com/LPCIC/elpi'
|
27
|
+
aliases = ['elpi']
|
28
|
+
filenames = ['*.elpi']
|
29
|
+
mimetypes = ['text/x-elpi']
|
30
|
+
|
31
|
+
lcase_re = r"[a-z]"
|
32
|
+
ucase_re = r"[A-Z]"
|
33
|
+
digit_re = r"[0-9]"
|
34
|
+
schar2_re = r"([+*^?/<>`'@#~=&!])"
|
35
|
+
schar_re = r"({}|-|\$|_)".format(schar2_re)
|
36
|
+
idchar_re = r"({}|{}|{}|{})".format(lcase_re,ucase_re,digit_re,schar_re)
|
37
|
+
idcharstarns_re = r"({}*(\.({}|{}){}*)*)".format(idchar_re, lcase_re, ucase_re, idchar_re)
|
38
|
+
symbchar_re = r"({}|{}|{}|{}|:)".format(lcase_re, ucase_re, digit_re, schar_re)
|
39
|
+
constant_re = r"({}{}*|{}{}|{}{}*|_{}+)".format(ucase_re, idchar_re, lcase_re, idcharstarns_re, schar2_re, symbchar_re, idchar_re)
|
40
|
+
symbol_re = r"(,|<=>|->|:-|;|\?-|->|&|=>|\bas\b|\buvar\b|<|=<|=|==|>=|>|\bi<|\bi=<|\bi>=|\bi>|\bis\b|\br<|\br=<|\br>=|\br>|\bs<|\bs=<|\bs>=|\bs>|@|::|\[\]|`->|`:|`:=|\^|-|\+|\bi-|\bi\+|r-|r\+|/|\*|\bdiv\b|\bi\*|\bmod\b|\br\*|~|\bi~|\br~)"
|
41
|
+
escape_re = r"\(({}|{})\)".format(constant_re,symbol_re)
|
42
|
+
const_sym_re = r"({}|{}|{})".format(constant_re,symbol_re,escape_re)
|
43
|
+
|
44
|
+
tokens = {
|
45
|
+
'root': [
|
46
|
+
include('elpi')
|
47
|
+
],
|
48
|
+
|
49
|
+
'elpi': [
|
50
|
+
include('_elpi-comment'),
|
51
|
+
|
52
|
+
(r"(:before|:after|:if|:name)(\s*)(\")",
|
53
|
+
bygroups(Keyword.Mode, Text.Whitespace, String.Double),
|
54
|
+
'elpi-string'),
|
55
|
+
(r"(:index)(\s*\()", bygroups(Keyword.Mode, Text.Whitespace),
|
56
|
+
'elpi-indexing-expr'),
|
57
|
+
(r"\b(external pred|pred)(\s+)({})".format(const_sym_re),
|
58
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
59
|
+
'elpi-pred-item'),
|
60
|
+
(r"\b(external type|type)(\s+)(({}(,\s*)?)+)".format(const_sym_re),
|
61
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
62
|
+
'elpi-type'),
|
63
|
+
(r"\b(kind)(\s+)(({}|,)+)".format(const_sym_re),
|
64
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
65
|
+
'elpi-type'),
|
66
|
+
(r"\b(typeabbrev)(\s+)({})".format(const_sym_re),
|
67
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
68
|
+
'elpi-type'),
|
69
|
+
(r"\b(accumulate)(\s+)(\")",
|
70
|
+
bygroups(Keyword.Declaration, Text.Whitespace, String.Double),
|
71
|
+
'elpi-string'),
|
72
|
+
(r"\b(accumulate|namespace|local)(\s+)({})".format(constant_re),
|
73
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Text)),
|
74
|
+
(r"\b(shorten)(\s+)({}\.)".format(constant_re),
|
75
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Text)),
|
76
|
+
(r"\b(pi|sigma)(\s+)([a-zA-Z][A-Za-z0-9_ ]*)(\\)",
|
77
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Name.Variable, Text)),
|
78
|
+
(r"\b(constraint)(\s+)(({}(\s+)?)+)".format(const_sym_re),
|
79
|
+
bygroups(Keyword.Declaration, Text.Whitespace, Name.Function),
|
80
|
+
'elpi-chr-rule-start'),
|
81
|
+
|
82
|
+
(r"(?=[A-Z_]){}".format(constant_re), Name.Variable),
|
83
|
+
(r"(?=[a-z_]){}\\".format(constant_re), Name.Variable),
|
84
|
+
(r"_", Name.Variable),
|
85
|
+
(r"({}|!|=>|;)".format(symbol_re), Keyword.Declaration),
|
86
|
+
(constant_re, Text),
|
87
|
+
(r"\[|\]|\||=>", Keyword.Declaration),
|
88
|
+
(r'"', String.Double, 'elpi-string'),
|
89
|
+
(r'`', String.Double, 'elpi-btick'),
|
90
|
+
(r'\'', String.Double, 'elpi-tick'),
|
91
|
+
(r'\{[^\{]', Text, 'elpi-spill'),
|
92
|
+
(r"\(", Text, 'elpi-in-parens'),
|
93
|
+
(r'\d[\d_]*', Number.Integer),
|
94
|
+
(r'-?\d[\d_]*(.[\d_]*)?([eE][+\-]?\d[\d_]*)', Number.Float),
|
95
|
+
(r"[\+\*\-/\^\.]", Operator),
|
96
|
+
],
|
97
|
+
'_elpi-comment': [
|
98
|
+
(r'%[^\n]*\n', Comment),
|
99
|
+
(r'/\*', Comment, 'elpi-multiline-comment'),
|
100
|
+
(r"\s+", Text.Whitespace),
|
101
|
+
],
|
102
|
+
'elpi-multiline-comment': [
|
103
|
+
(r'\*/', Comment, '#pop'),
|
104
|
+
(r'.', Comment)
|
105
|
+
],
|
106
|
+
'elpi-indexing-expr':[
|
107
|
+
(r'[0-9 _]+', Number.Integer),
|
108
|
+
(r'\)', Text, '#pop'),
|
109
|
+
],
|
110
|
+
'elpi-type': [
|
111
|
+
(r"(ctype\s+)(\")", bygroups(Keyword.Type, String.Double), 'elpi-string'),
|
112
|
+
(r'->', Keyword.Type),
|
113
|
+
(constant_re, Keyword.Type),
|
114
|
+
(r"\(|\)", Keyword.Type),
|
115
|
+
(r"\.", Text, '#pop'),
|
116
|
+
include('_elpi-comment'),
|
117
|
+
],
|
118
|
+
'elpi-chr-rule-start': [
|
119
|
+
(r"\{", Text, 'elpi-chr-rule'),
|
120
|
+
include('_elpi-comment'),
|
121
|
+
],
|
122
|
+
'elpi-chr-rule': [
|
123
|
+
(r"\brule\b", Keyword.Declaration),
|
124
|
+
(r"\\", Keyword.Declaration),
|
125
|
+
(r"\}", Text, '#pop:2'),
|
126
|
+
include('elpi'),
|
127
|
+
],
|
128
|
+
'elpi-pred-item': [
|
129
|
+
(r"[io]:", Keyword.Mode, 'elpi-ctype'),
|
130
|
+
(r"\.", Text, '#pop'),
|
131
|
+
include('_elpi-comment'),
|
132
|
+
],
|
133
|
+
'elpi-ctype': [
|
134
|
+
(r"(ctype\s+)(\")", bygroups(Keyword.Type, String.Double), 'elpi-string'),
|
135
|
+
(r'->', Keyword.Type),
|
136
|
+
(constant_re, Keyword.Type),
|
137
|
+
(r"\(|\)", Keyword.Type),
|
138
|
+
(r",", Text, '#pop'),
|
139
|
+
(r"\.", Text, '#pop:2'),
|
140
|
+
include('_elpi-comment'),
|
141
|
+
],
|
142
|
+
'elpi-btick': [
|
143
|
+
(r'[^` ]+', String.Double),
|
144
|
+
(r'`', String.Double, '#pop'),
|
145
|
+
],
|
146
|
+
'elpi-tick': [
|
147
|
+
(r'[^\' ]+', String.Double),
|
148
|
+
(r'\'', String.Double, '#pop'),
|
149
|
+
],
|
150
|
+
'elpi-string': [
|
151
|
+
(r'[^\"]+', String.Double),
|
152
|
+
(r'"', String.Double, '#pop'),
|
153
|
+
],
|
154
|
+
'elpi-spill': [
|
155
|
+
(r'\{[^\{]', Text, '#push'),
|
156
|
+
(r'\}[^\}]', Text, '#pop'),
|
157
|
+
include('elpi'),
|
158
|
+
],
|
159
|
+
'elpi-in-parens': [
|
160
|
+
(r"\(", Operator, '#push'),
|
161
|
+
(r"\)", Operator, '#pop'),
|
162
|
+
include('elpi'),
|
163
|
+
],
|
164
|
+
|
165
|
+
}
|
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
Lexer for the raw E-mail.
|
6
6
|
|
7
|
-
:copyright: Copyright 2006-
|
7
|
+
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
|
8
8
|
:license: BSD, see LICENSE for details.
|
9
9
|
"""
|
10
10
|
|
@@ -63,11 +63,9 @@ class EmailHeaderLexer(RegexLexer):
|
|
63
63
|
(r"\b(\w[\w\.-]*\.[\w\.-]*\w[a-zA-Z]+)\b", Name.Function),
|
64
64
|
|
65
65
|
# IPv4
|
66
|
-
(
|
67
|
-
|
68
|
-
|
69
|
-
Number.Integer,
|
70
|
-
),
|
66
|
+
(r"(?<=\b)(?:(?:25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(?:25[0"
|
67
|
+
r"-5]|2[0-4][0-9]|1?[0-9][0-9]?)(?=\b)",
|
68
|
+
Number.Integer),
|
71
69
|
|
72
70
|
# IPv6
|
73
71
|
(r"(?<=\b)([0-9a-fA-F]{1,4}:){1,7}:(?!\b)", Number.Hex),
|
@@ -83,43 +81,27 @@ class EmailHeaderLexer(RegexLexer):
|
|
83
81
|
Number.Hex),
|
84
82
|
(r"(?<=\b)([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}(?=\b)",
|
85
83
|
Number.Hex),
|
86
|
-
(
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
r"(?<=\b)([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-"
|
94
|
-
r"9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-"
|
95
|
-
r"9])(?=\b)",
|
96
|
-
Number.Hex,
|
97
|
-
),
|
84
|
+
(r"(?<=\b)::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}"
|
85
|
+
r"[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}"
|
86
|
+
r"[0-9])(?=\b)",
|
87
|
+
Number.Hex),
|
88
|
+
(r"(?<=\b)([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9])"
|
89
|
+
r"{0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])(?=\b)",
|
90
|
+
Number.Hex),
|
98
91
|
|
99
92
|
# Date time
|
100
|
-
(
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
Name.Decorator,
|
107
|
-
),
|
93
|
+
(r"(?:(Sun|Mon|Tue|Wed|Thu|Fri|Sat),\s+)?(0[1-9]|[1-2]?[0-9]|3["
|
94
|
+
r"01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+("
|
95
|
+
r"19[0-9]{2}|[2-9][0-9]{3})\s+(2[0-3]|[0-1][0-9]):([0-5][0-9])"
|
96
|
+
r"(?::(60|[0-5][0-9]))?(?:\.\d{1,5})?\s+([-\+][0-9]{2}[0-5][0-"
|
97
|
+
r"9]|\(?(?:UTC?|GMT|(?:E|C|M|P)(?:ST|ET|DT)|[A-IK-Z])\)?)",
|
98
|
+
Name.Decorator),
|
108
99
|
|
109
100
|
# RFC-2047 encoded string
|
110
|
-
(
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
String.Affix,
|
115
|
-
Name.Constant,
|
116
|
-
String.Affix,
|
117
|
-
Keyword.Constant,
|
118
|
-
String.Affix,
|
119
|
-
Number.Hex,
|
120
|
-
String.Affix
|
121
|
-
)
|
122
|
-
),
|
101
|
+
(r"(=\?)([\w-]+)(\?)([BbQq])(\?)([\[\w!\"#$%&\'()*+,-./:;<=>@[\\"
|
102
|
+
r"\]^_`{|}~]+)(\?=)",
|
103
|
+
bygroups(String.Affix, Name.Constant, String.Affix, Keyword.Constant,
|
104
|
+
String.Affix, Number.Hex, String.Affix)),
|
123
105
|
|
124
106
|
# others
|
125
107
|
(r'[\s]+', Text.Whitespace),
|