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.
Files changed (324) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +1 -1
  3. data/.rubocop.yml +7 -0
  4. data/CHANGELOG.adoc +4 -0
  5. data/README.adoc +1 -1
  6. data/bench.rb +1 -1
  7. data/lib/pygments/popen.rb +3 -7
  8. data/lib/pygments/version.rb +1 -1
  9. data/pygments.rb.gemspec +2 -2
  10. data/test/test_pygments.rb +0 -19
  11. data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/AUTHORS +21 -1
  12. data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/LICENSE +1 -1
  13. data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/METADATA +19 -11
  14. data/vendor/pygments-main/Pygments-2.15.1.dist-info/RECORD +614 -0
  15. data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/WHEEL +1 -1
  16. data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/entry_points.txt +0 -1
  17. data/vendor/pygments-main/bin/pygmentize +1 -1
  18. data/vendor/pygments-main/pygments/__init__.py +20 -22
  19. data/vendor/pygments-main/pygments/__main__.py +1 -1
  20. data/vendor/pygments-main/pygments/cmdline.py +74 -8
  21. data/vendor/pygments-main/pygments/console.py +1 -1
  22. data/vendor/pygments-main/pygments/filter.py +1 -1
  23. data/vendor/pygments-main/pygments/filters/__init__.py +6 -3
  24. data/vendor/pygments-main/pygments/formatter.py +41 -11
  25. data/vendor/pygments-main/pygments/formatters/__init__.py +21 -16
  26. data/vendor/pygments-main/pygments/formatters/_mapping.py +5 -65
  27. data/vendor/pygments-main/pygments/formatters/bbcode.py +1 -1
  28. data/vendor/pygments-main/pygments/formatters/groff.py +170 -0
  29. data/vendor/pygments-main/pygments/formatters/html.py +54 -32
  30. data/vendor/pygments-main/pygments/formatters/img.py +9 -5
  31. data/vendor/pygments-main/pygments/formatters/irc.py +6 -33
  32. data/vendor/pygments-main/pygments/formatters/latex.py +24 -14
  33. data/vendor/pygments-main/pygments/formatters/other.py +1 -1
  34. data/vendor/pygments-main/pygments/formatters/pangomarkup.py +1 -1
  35. data/vendor/pygments-main/pygments/formatters/rtf.py +1 -1
  36. data/vendor/pygments-main/pygments/formatters/svg.py +1 -1
  37. data/vendor/pygments-main/pygments/formatters/terminal.py +1 -3
  38. data/vendor/pygments-main/pygments/formatters/terminal256.py +2 -4
  39. data/vendor/pygments-main/pygments/lexer.py +101 -32
  40. data/vendor/pygments-main/pygments/lexers/__init__.py +50 -29
  41. data/vendor/pygments-main/pygments/lexers/_ada_builtins.py +103 -0
  42. data/vendor/pygments-main/pygments/lexers/_asy_builtins.py +1 -1
  43. data/vendor/pygments-main/pygments/lexers/_cl_builtins.py +1 -1
  44. data/vendor/pygments-main/pygments/lexers/_cocoa_builtins.py +2 -2
  45. data/vendor/pygments-main/pygments/lexers/_csound_builtins.py +21 -6
  46. data/vendor/pygments-main/pygments/lexers/_css_builtins.py +558 -0
  47. data/vendor/pygments-main/pygments/lexers/_julia_builtins.py +10 -0
  48. data/vendor/pygments-main/pygments/lexers/_lasso_builtins.py +1 -1
  49. data/vendor/pygments-main/pygments/lexers/_lilypond_builtins.py +4932 -0
  50. data/vendor/pygments-main/pygments/lexers/_lua_builtins.py +11 -18
  51. data/vendor/pygments-main/pygments/lexers/_mapping.py +71 -82
  52. data/vendor/pygments-main/pygments/lexers/_mql_builtins.py +1 -1
  53. data/vendor/pygments-main/pygments/lexers/_mysql_builtins.py +58 -4
  54. data/vendor/pygments-main/pygments/lexers/_openedge_builtins.py +1 -1
  55. data/vendor/pygments-main/pygments/lexers/_php_builtins.py +408 -1835
  56. data/vendor/pygments-main/pygments/lexers/_postgres_builtins.py +70 -8
  57. data/vendor/pygments-main/pygments/lexers/_qlik_builtins.py +666 -0
  58. data/vendor/pygments-main/pygments/lexers/_scheme_builtins.py +1609 -0
  59. data/vendor/pygments-main/pygments/lexers/_scilab_builtins.py +3 -3
  60. data/vendor/pygments-main/pygments/lexers/_sourcemod_builtins.py +9 -18
  61. data/vendor/pygments-main/pygments/lexers/_stan_builtins.py +185 -94
  62. data/vendor/pygments-main/pygments/lexers/_stata_builtins.py +1 -1
  63. data/vendor/pygments-main/pygments/lexers/_tsql_builtins.py +1 -1
  64. data/vendor/pygments-main/pygments/lexers/_usd_builtins.py +1 -1
  65. data/vendor/pygments-main/pygments/lexers/_vbscript_builtins.py +1 -1
  66. data/vendor/pygments-main/pygments/lexers/_vim_builtins.py +1 -1
  67. data/vendor/pygments-main/pygments/lexers/actionscript.py +15 -14
  68. data/vendor/pygments-main/pygments/lexers/ada.py +144 -0
  69. data/vendor/pygments-main/pygments/lexers/agile.py +1 -1
  70. data/vendor/pygments-main/pygments/lexers/algebra.py +72 -9
  71. data/vendor/pygments-main/pygments/lexers/ambient.py +8 -7
  72. data/vendor/pygments-main/pygments/lexers/amdgpu.py +4 -3
  73. data/vendor/pygments-main/pygments/lexers/ampl.py +10 -8
  74. data/vendor/pygments-main/pygments/lexers/apdlexer.py +164 -20
  75. data/vendor/pygments-main/pygments/lexers/apl.py +6 -5
  76. data/vendor/pygments-main/pygments/lexers/archetype.py +23 -21
  77. data/vendor/pygments-main/pygments/lexers/arrow.py +10 -9
  78. data/vendor/pygments-main/pygments/lexers/arturo.py +250 -0
  79. data/vendor/pygments-main/pygments/lexers/asc.py +9 -5
  80. data/vendor/pygments-main/pygments/lexers/asm.py +68 -63
  81. data/vendor/pygments-main/pygments/lexers/automation.py +7 -5
  82. data/vendor/pygments-main/pygments/lexers/bare.py +20 -21
  83. data/vendor/pygments-main/pygments/lexers/basic.py +45 -41
  84. data/vendor/pygments-main/pygments/lexers/bdd.py +58 -0
  85. data/vendor/pygments-main/pygments/lexers/berry.py +99 -0
  86. data/vendor/pygments-main/pygments/lexers/bibtex.py +6 -6
  87. data/vendor/pygments-main/pygments/lexers/boa.py +4 -8
  88. data/vendor/pygments-main/pygments/lexers/business.py +18 -18
  89. data/vendor/pygments-main/pygments/lexers/c_cpp.py +80 -40
  90. data/vendor/pygments-main/pygments/lexers/c_like.py +21 -19
  91. data/vendor/pygments-main/pygments/lexers/capnproto.py +6 -8
  92. data/vendor/pygments-main/pygments/lexers/carbon.py +96 -0
  93. data/vendor/pygments-main/pygments/lexers/cddl.py +16 -33
  94. data/vendor/pygments-main/pygments/lexers/chapel.py +14 -9
  95. data/vendor/pygments-main/pygments/lexers/clean.py +3 -2
  96. data/vendor/pygments-main/pygments/lexers/comal.py +80 -0
  97. data/vendor/pygments-main/pygments/lexers/compiled.py +3 -2
  98. data/vendor/pygments-main/pygments/lexers/configs.py +235 -120
  99. data/vendor/pygments-main/pygments/lexers/console.py +5 -4
  100. data/vendor/pygments-main/pygments/lexers/cplint.py +44 -0
  101. data/vendor/pygments-main/pygments/lexers/crystal.py +22 -23
  102. data/vendor/pygments-main/pygments/lexers/csound.py +19 -17
  103. data/vendor/pygments-main/pygments/lexers/css.py +67 -159
  104. data/vendor/pygments-main/pygments/lexers/d.py +15 -12
  105. data/vendor/pygments-main/pygments/lexers/dalvik.py +14 -11
  106. data/vendor/pygments-main/pygments/lexers/data.py +119 -49
  107. data/vendor/pygments-main/pygments/lexers/dax.py +136 -0
  108. data/vendor/pygments-main/pygments/lexers/devicetree.py +9 -8
  109. data/vendor/pygments-main/pygments/lexers/diff.py +23 -19
  110. data/vendor/pygments-main/pygments/lexers/dotnet.py +216 -81
  111. data/vendor/pygments-main/pygments/lexers/dsls.py +86 -64
  112. data/vendor/pygments-main/pygments/lexers/dylan.py +16 -15
  113. data/vendor/pygments-main/pygments/lexers/ecl.py +46 -38
  114. data/vendor/pygments-main/pygments/lexers/eiffel.py +15 -10
  115. data/vendor/pygments-main/pygments/lexers/elm.py +12 -8
  116. data/vendor/pygments-main/pygments/lexers/elpi.py +165 -0
  117. data/vendor/pygments-main/pygments/lexers/email.py +21 -39
  118. data/vendor/pygments-main/pygments/lexers/erlang.py +21 -22
  119. data/vendor/pygments-main/pygments/lexers/esoteric.py +28 -30
  120. data/vendor/pygments-main/pygments/lexers/ezhil.py +10 -9
  121. data/vendor/pygments-main/pygments/lexers/factor.py +104 -83
  122. data/vendor/pygments-main/pygments/lexers/fantom.py +31 -29
  123. data/vendor/pygments-main/pygments/lexers/felix.py +18 -14
  124. data/vendor/pygments-main/pygments/lexers/fift.py +67 -0
  125. data/vendor/pygments-main/pygments/lexers/floscript.py +7 -7
  126. data/vendor/pygments-main/pygments/lexers/forth.py +8 -6
  127. data/vendor/pygments-main/pygments/lexers/fortran.py +16 -11
  128. data/vendor/pygments-main/pygments/lexers/foxpro.py +2 -2
  129. data/vendor/pygments-main/pygments/lexers/freefem.py +7 -10
  130. data/vendor/pygments-main/pygments/lexers/func.py +108 -0
  131. data/vendor/pygments-main/pygments/lexers/functional.py +1 -1
  132. data/vendor/pygments-main/pygments/lexers/futhark.py +12 -17
  133. data/vendor/pygments-main/pygments/lexers/gcodelexer.py +1 -2
  134. data/vendor/pygments-main/pygments/lexers/gdscript.py +76 -233
  135. data/vendor/pygments-main/pygments/lexers/go.py +12 -14
  136. data/vendor/pygments-main/pygments/lexers/grammar_notation.py +22 -26
  137. data/vendor/pygments-main/pygments/lexers/graph.py +36 -15
  138. data/vendor/pygments-main/pygments/lexers/graphics.py +37 -38
  139. data/vendor/pygments-main/pygments/lexers/graphviz.py +2 -1
  140. data/vendor/pygments-main/pygments/lexers/gsql.py +39 -27
  141. data/vendor/pygments-main/pygments/lexers/haskell.py +73 -71
  142. data/vendor/pygments-main/pygments/lexers/haxe.py +13 -11
  143. data/vendor/pygments-main/pygments/lexers/hdl.py +31 -34
  144. data/vendor/pygments-main/pygments/lexers/hexdump.py +21 -21
  145. data/vendor/pygments-main/pygments/lexers/html.py +11 -19
  146. data/vendor/pygments-main/pygments/lexers/idl.py +10 -5
  147. data/vendor/pygments-main/pygments/lexers/igor.py +3 -2
  148. data/vendor/pygments-main/pygments/lexers/inferno.py +9 -8
  149. data/vendor/pygments-main/pygments/lexers/installers.py +39 -33
  150. data/vendor/pygments-main/pygments/lexers/int_fiction.py +35 -20
  151. data/vendor/pygments-main/pygments/lexers/iolang.py +9 -9
  152. data/vendor/pygments-main/pygments/lexers/j.py +20 -13
  153. data/vendor/pygments-main/pygments/lexers/javascript.py +183 -149
  154. data/vendor/pygments-main/pygments/lexers/jmespath.py +68 -0
  155. data/vendor/pygments-main/pygments/lexers/jslt.py +4 -3
  156. data/vendor/pygments-main/pygments/lexers/jsonnet.py +168 -0
  157. data/vendor/pygments-main/pygments/lexers/julia.py +44 -32
  158. data/vendor/pygments-main/pygments/lexers/jvm.py +161 -140
  159. data/vendor/pygments-main/pygments/lexers/kuin.py +93 -59
  160. data/vendor/pygments-main/pygments/lexers/lilypond.py +226 -0
  161. data/vendor/pygments-main/pygments/lexers/lisp.py +244 -107
  162. data/vendor/pygments-main/pygments/lexers/macaulay2.py +1739 -0
  163. data/vendor/pygments-main/pygments/lexers/make.py +21 -16
  164. data/vendor/pygments-main/pygments/lexers/markup.py +752 -11
  165. data/vendor/pygments-main/pygments/lexers/math.py +1 -1
  166. data/vendor/pygments-main/pygments/lexers/matlab.py +18 -3
  167. data/vendor/pygments-main/pygments/lexers/maxima.py +85 -0
  168. data/vendor/pygments-main/pygments/lexers/meson.py +10 -25
  169. data/vendor/pygments-main/pygments/lexers/mime.py +2 -2
  170. data/vendor/pygments-main/pygments/lexers/minecraft.py +394 -0
  171. data/vendor/pygments-main/pygments/lexers/mips.py +128 -0
  172. data/vendor/pygments-main/pygments/lexers/ml.py +9 -6
  173. data/vendor/pygments-main/pygments/lexers/modeling.py +12 -8
  174. data/vendor/pygments-main/pygments/lexers/modula2.py +3 -2
  175. data/vendor/pygments-main/pygments/lexers/monte.py +3 -2
  176. data/vendor/pygments-main/pygments/lexers/mosel.py +1 -1
  177. data/vendor/pygments-main/pygments/lexers/ncl.py +1 -1
  178. data/vendor/pygments-main/pygments/lexers/nimrod.py +62 -20
  179. data/vendor/pygments-main/pygments/lexers/nit.py +3 -2
  180. data/vendor/pygments-main/pygments/lexers/nix.py +5 -5
  181. data/vendor/pygments-main/pygments/lexers/oberon.py +2 -2
  182. data/vendor/pygments-main/pygments/lexers/objective.py +6 -4
  183. data/vendor/pygments-main/pygments/lexers/ooc.py +3 -2
  184. data/vendor/pygments-main/pygments/lexers/other.py +1 -1
  185. data/vendor/pygments-main/pygments/lexers/parasail.py +3 -2
  186. data/vendor/pygments-main/pygments/lexers/parsers.py +23 -21
  187. data/vendor/pygments-main/pygments/lexers/pascal.py +196 -198
  188. data/vendor/pygments-main/pygments/lexers/pawn.py +1 -1
  189. data/vendor/pygments-main/pygments/lexers/perl.py +17 -15
  190. data/vendor/pygments-main/pygments/lexers/phix.py +364 -0
  191. data/vendor/pygments-main/pygments/lexers/php.py +35 -20
  192. data/vendor/pygments-main/pygments/lexers/pointless.py +3 -2
  193. data/vendor/pygments-main/pygments/lexers/pony.py +1 -1
  194. data/vendor/pygments-main/pygments/lexers/praat.py +41 -38
  195. data/vendor/pygments-main/pygments/lexers/procfile.py +2 -3
  196. data/vendor/pygments-main/pygments/lexers/prolog.py +7 -8
  197. data/vendor/pygments-main/pygments/lexers/promql.py +5 -12
  198. data/vendor/pygments-main/pygments/lexers/python.py +145 -119
  199. data/vendor/pygments-main/pygments/lexers/q.py +188 -0
  200. data/vendor/pygments-main/pygments/lexers/qlik.py +117 -0
  201. data/vendor/pygments-main/pygments/lexers/qvt.py +1 -1
  202. data/vendor/pygments-main/pygments/lexers/r.py +4 -4
  203. data/vendor/pygments-main/pygments/lexers/rdf.py +3 -3
  204. data/vendor/pygments-main/pygments/lexers/rebol.py +1 -12
  205. data/vendor/pygments-main/pygments/lexers/resource.py +1 -1
  206. data/vendor/pygments-main/pygments/lexers/ride.py +3 -2
  207. data/vendor/pygments-main/pygments/lexers/rita.py +43 -0
  208. data/vendor/pygments-main/pygments/lexers/rnc.py +3 -2
  209. data/vendor/pygments-main/pygments/lexers/roboconf.py +3 -3
  210. data/vendor/pygments-main/pygments/lexers/robotframework.py +6 -5
  211. data/vendor/pygments-main/pygments/lexers/ruby.py +24 -24
  212. data/vendor/pygments-main/pygments/lexers/rust.py +3 -2
  213. data/vendor/pygments-main/pygments/lexers/sas.py +2 -2
  214. data/vendor/pygments-main/pygments/lexers/savi.py +170 -0
  215. data/vendor/pygments-main/pygments/lexers/scdoc.py +4 -7
  216. data/vendor/pygments-main/pygments/lexers/scripting.py +24 -21
  217. data/vendor/pygments-main/pygments/lexers/sgf.py +6 -6
  218. data/vendor/pygments-main/pygments/lexers/shell.py +29 -21
  219. data/vendor/pygments-main/pygments/lexers/sieve.py +14 -4
  220. data/vendor/pygments-main/pygments/lexers/slash.py +1 -1
  221. data/vendor/pygments-main/pygments/lexers/smalltalk.py +5 -3
  222. data/vendor/pygments-main/pygments/lexers/smithy.py +5 -6
  223. data/vendor/pygments-main/pygments/lexers/smv.py +1 -1
  224. data/vendor/pygments-main/pygments/lexers/snobol.py +1 -1
  225. data/vendor/pygments-main/pygments/lexers/solidity.py +3 -7
  226. data/vendor/pygments-main/pygments/lexers/sophia.py +103 -0
  227. data/vendor/pygments-main/pygments/lexers/special.py +2 -5
  228. data/vendor/pygments-main/pygments/lexers/spice.py +71 -0
  229. data/vendor/pygments-main/pygments/lexers/sql.py +212 -17
  230. data/vendor/pygments-main/pygments/lexers/srcinfo.py +62 -0
  231. data/vendor/pygments-main/pygments/lexers/stata.py +4 -3
  232. data/vendor/pygments-main/pygments/lexers/supercollider.py +4 -3
  233. data/vendor/pygments-main/pygments/lexers/tal.py +74 -0
  234. data/vendor/pygments-main/pygments/lexers/tcl.py +21 -16
  235. data/vendor/pygments-main/pygments/lexers/teal.py +9 -8
  236. data/vendor/pygments-main/pygments/lexers/templates.py +62 -29
  237. data/vendor/pygments-main/pygments/lexers/teraterm.py +12 -20
  238. data/vendor/pygments-main/pygments/lexers/testing.py +6 -2
  239. data/vendor/pygments-main/pygments/lexers/text.py +3 -2
  240. data/vendor/pygments-main/pygments/lexers/textedit.py +41 -7
  241. data/vendor/pygments-main/pygments/lexers/textfmts.py +7 -5
  242. data/vendor/pygments-main/pygments/lexers/theorem.py +42 -36
  243. data/vendor/pygments-main/pygments/lexers/thingsdb.py +2 -4
  244. data/vendor/pygments-main/pygments/lexers/tlb.py +57 -0
  245. data/vendor/pygments-main/pygments/lexers/tnt.py +3 -4
  246. data/vendor/pygments-main/pygments/lexers/trafficscript.py +2 -4
  247. data/vendor/pygments-main/pygments/lexers/typoscript.py +2 -3
  248. data/vendor/pygments-main/pygments/lexers/ul4.py +267 -0
  249. data/vendor/pygments-main/pygments/lexers/unicon.py +1 -1
  250. data/vendor/pygments-main/pygments/lexers/urbi.py +4 -4
  251. data/vendor/pygments-main/pygments/lexers/usd.py +2 -1
  252. data/vendor/pygments-main/pygments/lexers/varnish.py +5 -5
  253. data/vendor/pygments-main/pygments/lexers/verification.py +4 -3
  254. data/vendor/pygments-main/pygments/lexers/web.py +1 -1
  255. data/vendor/pygments-main/pygments/lexers/webassembly.py +5 -5
  256. data/vendor/pygments-main/pygments/lexers/webidl.py +2 -1
  257. data/vendor/pygments-main/pygments/lexers/webmisc.py +90 -71
  258. data/vendor/pygments-main/pygments/lexers/wgsl.py +407 -0
  259. data/vendor/pygments-main/pygments/lexers/whiley.py +2 -1
  260. data/vendor/pygments-main/pygments/lexers/wowtoc.py +120 -0
  261. data/vendor/pygments-main/pygments/lexers/wren.py +99 -0
  262. data/vendor/pygments-main/pygments/lexers/x10.py +5 -6
  263. data/vendor/pygments-main/pygments/lexers/xorg.py +3 -2
  264. data/vendor/pygments-main/pygments/lexers/yang.py +6 -5
  265. data/vendor/pygments-main/pygments/lexers/zig.py +3 -2
  266. data/vendor/pygments-main/pygments/modeline.py +1 -1
  267. data/vendor/pygments-main/pygments/plugin.py +28 -9
  268. data/vendor/pygments-main/pygments/regexopt.py +1 -1
  269. data/vendor/pygments-main/pygments/scanner.py +2 -2
  270. data/vendor/pygments-main/pygments/sphinxext.py +63 -1
  271. data/vendor/pygments-main/pygments/style.py +7 -1
  272. data/vendor/pygments-main/pygments/styles/__init__.py +19 -5
  273. data/vendor/pygments-main/pygments/styles/abap.py +2 -2
  274. data/vendor/pygments-main/pygments/styles/algol.py +1 -2
  275. data/vendor/pygments-main/pygments/styles/algol_nu.py +1 -2
  276. data/vendor/pygments-main/pygments/styles/arduino.py +2 -3
  277. data/vendor/pygments-main/pygments/styles/autumn.py +1 -3
  278. data/vendor/pygments-main/pygments/styles/borland.py +1 -3
  279. data/vendor/pygments-main/pygments/styles/bw.py +1 -2
  280. data/vendor/pygments-main/pygments/styles/colorful.py +1 -3
  281. data/vendor/pygments-main/pygments/styles/default.py +13 -14
  282. data/vendor/pygments-main/pygments/styles/dracula.py +102 -0
  283. data/vendor/pygments-main/pygments/styles/emacs.py +1 -2
  284. data/vendor/pygments-main/pygments/styles/friendly.py +1 -2
  285. data/vendor/pygments-main/pygments/styles/friendly_grayscale.py +75 -0
  286. data/vendor/pygments-main/pygments/styles/fruity.py +1 -1
  287. data/vendor/pygments-main/pygments/styles/gh_dark.py +107 -0
  288. data/vendor/pygments-main/pygments/styles/gruvbox.py +4 -2
  289. data/vendor/pygments-main/pygments/styles/igor.py +1 -2
  290. data/vendor/pygments-main/pygments/styles/inkpot.py +3 -2
  291. data/vendor/pygments-main/pygments/styles/lilypond.py +56 -0
  292. data/vendor/pygments-main/pygments/styles/lovelace.py +1 -3
  293. data/vendor/pygments-main/pygments/styles/manni.py +1 -1
  294. data/vendor/pygments-main/pygments/styles/material.py +1 -2
  295. data/vendor/pygments-main/pygments/styles/monokai.py +3 -3
  296. data/vendor/pygments-main/pygments/styles/murphy.py +1 -3
  297. data/vendor/pygments-main/pygments/styles/native.py +11 -11
  298. data/vendor/pygments-main/pygments/styles/nord.py +150 -0
  299. data/vendor/pygments-main/pygments/styles/onedark.py +59 -0
  300. data/vendor/pygments-main/pygments/styles/paraiso_dark.py +1 -6
  301. data/vendor/pygments-main/pygments/styles/paraiso_light.py +1 -6
  302. data/vendor/pygments-main/pygments/styles/pastie.py +1 -3
  303. data/vendor/pygments-main/pygments/styles/perldoc.py +1 -2
  304. data/vendor/pygments-main/pygments/styles/rainbow_dash.py +3 -3
  305. data/vendor/pygments-main/pygments/styles/rrt.py +3 -2
  306. data/vendor/pygments-main/pygments/styles/sas.py +2 -4
  307. data/vendor/pygments-main/pygments/styles/solarized.py +1 -1
  308. data/vendor/pygments-main/pygments/styles/staroffice.py +26 -0
  309. data/vendor/pygments-main/pygments/styles/stata_dark.py +4 -6
  310. data/vendor/pygments-main/pygments/styles/stata_light.py +1 -2
  311. data/vendor/pygments-main/pygments/styles/tango.py +2 -3
  312. data/vendor/pygments-main/pygments/styles/trac.py +1 -3
  313. data/vendor/pygments-main/pygments/styles/vim.py +1 -2
  314. data/vendor/pygments-main/pygments/styles/vs.py +1 -2
  315. data/vendor/pygments-main/pygments/styles/xcode.py +1 -3
  316. data/vendor/pygments-main/pygments/styles/zenburn.py +4 -6
  317. data/vendor/pygments-main/pygments/token.py +2 -1
  318. data/vendor/pygments-main/pygments/unistring.py +4 -6
  319. data/vendor/pygments-main/pygments/util.py +27 -5
  320. metadata +59 -14
  321. data/vendor/pygments-main/Pygments-2.10.0.dist-info/RECORD +0 -524
  322. /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/INSTALLER +0 -0
  323. /data/vendor/pygments-main/{Pygments-2.10.0.dist-info → Pygments-2.15.1.dist-info}/REQUESTED +0 -0
  324. /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-2021 by the Pygments team, see AUTHORS.
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 Text, Comment, Operator, Keyword, Name, String, \
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 `ECL
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+', Text),
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, Text)),
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', 'BETWEEN', 'CASE',
84
- 'CONST', 'COUNTER', 'CSV', 'DESCEND', 'ENCRYPT', 'ENDC++', 'ENDMACRO', 'EXCEPT',
85
- 'EXCLUSIVE', 'EXPIRE', 'EXPORT', 'EXTEND', 'FALSE', 'FEW', 'FIRST', 'FLAT', 'FULL',
86
- 'FUNCTION', 'GROUP', 'HEADER', 'HEADING', 'HOLE', 'IFBLOCK', 'IMPORT', 'IN', 'JOINED',
87
- 'KEEP', 'KEYED', 'LAST', 'LEFT', 'LIMIT', 'LOAD', 'LOCAL', 'LOCALE', 'LOOKUP', 'MACRO',
88
- 'MANY', 'MAXCOUNT', 'MAXLENGTH', 'MIN SKEW', 'MODULE', 'INTERFACE', 'NAMED', 'NOCASE',
89
- 'NOROOT', 'NOSCAN', 'NOSORT', 'NOT', 'OF', 'ONLY', 'OPT', 'OR', 'OUTER', 'OVERWRITE',
90
- 'PACKED', 'PARTITION', 'PENALTY', 'PHYSICALLENGTH', 'PIPE', 'QUOTE', 'RELATIONSHIP',
91
- 'REPEAT', 'RETURN', 'RIGHT', 'SCAN', 'SELF', 'SEPARATOR', 'SERVICE', 'SHARED', 'SKEW',
92
- 'SKIP', 'SQL', 'STORE', 'TERMINATOR', 'THOR', 'THRESHOLD', 'TOKEN', 'TRANSFORM', 'TRIM',
93
- 'TRUE', 'TYPE', 'UNICODEORDER', 'UNSORTED', 'VALIDATE', 'VIRTUAL', 'WHOLE', 'WILD',
94
- 'WITHIN', 'XML', 'XPATH', '__COMPRESSED__'), suffix=r'\b'),
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', 'ATAN2', 'AVE', 'CASE',
100
- 'CHOOSE', 'CHOOSEN', 'CHOOSESETS', 'CLUSTERSIZE', 'COMBINE', 'CORRELATION', 'COS',
101
- 'COSH', 'COUNT', 'COVARIANCE', 'CRON', 'DATASET', 'DEDUP', 'DEFINE', 'DENORMALIZE',
102
- 'DISTRIBUTE', 'DISTRIBUTED', 'DISTRIBUTION', 'EBCDIC', 'ENTH', 'ERROR', 'EVALUATE',
103
- 'EVENT', 'EVENTEXTRA', 'EVENTNAME', 'EXISTS', 'EXP', 'FAILCODE', 'FAILMESSAGE',
104
- 'FETCH', 'FROMUNICODE', 'GETISVALID', 'GLOBAL', 'GRAPH', 'GROUP', 'HASH', 'HASH32',
105
- 'HASH64', 'HASHCRC', 'HASHMD5', 'HAVING', 'IF', 'INDEX', 'INTFORMAT', 'ISVALID',
106
- 'ITERATE', 'JOIN', 'KEYUNICODE', 'LENGTH', 'LIBRARY', 'LIMIT', 'LN', 'LOCAL', 'LOG', 'LOOP',
107
- 'MAP', 'MATCHED', 'MATCHLENGTH', 'MATCHPOSITION', 'MATCHTEXT', 'MATCHUNICODE',
108
- 'MAX', 'MERGE', 'MERGEJOIN', 'MIN', 'NOLOCAL', 'NONEMPTY', 'NORMALIZE', 'PARSE', 'PIPE',
109
- 'POWER', 'PRELOAD', 'PROCESS', 'PROJECT', 'PULL', 'RANDOM', 'RANGE', 'RANK', 'RANKED',
110
- 'REALFORMAT', 'RECORDOF', 'REGEXFIND', 'REGEXREPLACE', 'REGROUP', 'REJECTED',
111
- 'ROLLUP', 'ROUND', 'ROUNDUP', 'ROW', 'ROWDIFF', 'SAMPLE', 'SET', 'SIN', 'SINH', 'SIZEOF',
112
- 'SOAPCALL', 'SORT', 'SORTED', 'SQRT', 'STEPPED', 'STORED', 'SUM', 'TABLE', 'TAN', 'TANH',
113
- 'THISNODE', 'TOPN', 'TOUNICODE', 'TRANSFER', 'TRIM', 'TRUNCATE', 'TYPEOF', 'UNGROUP',
114
- 'UNICODEORDER', 'VARIANCE', 'WHICH', 'WORKUNIT', 'XMLDECODE', 'XMLENCODE',
115
- 'XMLTEXT', 'XMLUNICODE'), suffix=r'\b'),
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 conjuction with BEGIN/END seems relatively rare though."""
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-2021 by the Pygments team, see AUTHORS.
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 Text, Comment, Operator, Keyword, Name, String, \
13
- Number, Punctuation
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 `Eiffel <http://www.eiffel.com>`_ source code.
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]+', Text),
32
- (r'--.*?\n', Comment.Single),
33
- (r'[^\S\n]+', Text),
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)(and(\s+then)?|not|xor|implies|or(\s+else)?)\b', Operator.Word),
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+', Text),
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-2021 by the Pygments team, see AUTHORS.
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, String, Text
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 `Elm <http://elm-lang.org/>`_ source code.
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+', Text),
54
+ (r'\s+', Whitespace),
53
55
 
54
56
  # Strings
55
57
  (r'"', String, 'doublequote'),
56
58
 
57
59
  # Modules
58
- (r'^\s*module\s*', Keyword.Namespace, 'imports'),
60
+ (r'^(\s*)(module)(\s*)', bygroups(Whitespace, Keyword.Namespace,
61
+ Whitespace), 'imports'),
59
62
 
60
63
  # Imports
61
- (r'^\s*import\s*', Keyword.Namespace, 'imports'),
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'.*\n', Name.Entity),
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-2021 by the Pygments team, see AUTHORS.
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
- r"(?<=\b)(?:(?:25[0-5]|2[0-4][0-9]|1?[0-9][0-9]?)\.){3}(?:25[0"
68
- r"-5]|2[0-4][0-9]|1?[0-9][0-9]?)(?=\b)",
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
- r"(?<=\b)::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}"
88
- r"[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}"
89
- r"[0-9])(?=\b)",
90
- Number.Hex,
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
- r"(?:(Sun|Mon|Tue|Wed|Thu|Fri|Sat),\s+)?(0[1-9]|[1-2]?[0-9]|3["
102
- r"01])\s+(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s+("
103
- r"19[0-9]{2}|[2-9][0-9]{3})\s+(2[0-3]|[0-1][0-9]):([0-5][0-9])"
104
- r"(?::(60|[0-5][0-9]))?(?:\.\d{1,5})?\s+([-\+][0-9]{2}[0-5][0-"
105
- r"9]|\(?(?:UTC?|GMT|(?:E|C|M|P)(?:ST|ET|DT)|[A-IK-Z])\)?)",
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
- r"(=\?)([\w-]+)(\?)([BbQq])(\?)([\[\w!\"#$%&\'()*+,-./:;<=>@[\\"
112
- r"\]^_`{|}~]+)(\?=)",
113
- bygroups(
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),