repl-sdk 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/package.json +12 -20
  2. package/dist/apl-fqmucPXA.js +0 -141
  3. package/dist/apl-fqmucPXA.js.map +0 -1
  4. package/dist/asciiarmor-DucZyvP0.js +0 -57
  5. package/dist/asciiarmor-DucZyvP0.js.map +0 -1
  6. package/dist/asn1-BnOEsgAm.js +0 -145
  7. package/dist/asn1-BnOEsgAm.js.map +0 -1
  8. package/dist/assets/tar-worker-CxTcoQcr.js +0 -593
  9. package/dist/assets/tar-worker-CxTcoQcr.js.map +0 -1
  10. package/dist/asterisk-QAlztEwS.js +0 -346
  11. package/dist/asterisk-QAlztEwS.js.map +0 -1
  12. package/dist/brainfuck-DZVCuF_t.js +0 -54
  13. package/dist/brainfuck-DZVCuF_t.js.map +0 -1
  14. package/dist/clike-CTYGlS6x.js +0 -800
  15. package/dist/clike-CTYGlS6x.js.map +0 -1
  16. package/dist/clojure-BhXMqnxz.js +0 -850
  17. package/dist/clojure-BhXMqnxz.js.map +0 -1
  18. package/dist/cmake-BGaNd9E7.js +0 -72
  19. package/dist/cmake-BGaNd9E7.js.map +0 -1
  20. package/dist/cobol-4yqQntpt.js +0 -121
  21. package/dist/cobol-4yqQntpt.js.map +0 -1
  22. package/dist/codemirror-De3S70Np.js +0 -2912
  23. package/dist/codemirror-De3S70Np.js.map +0 -1
  24. package/dist/coffeescript-D2dXvhEc.js +0 -309
  25. package/dist/coffeescript-D2dXvhEc.js.map +0 -1
  26. package/dist/commonlisp-CF_VNHQR.js +0 -131
  27. package/dist/commonlisp-CF_VNHQR.js.map +0 -1
  28. package/dist/crystal-DyuLTqLs.js +0 -399
  29. package/dist/crystal-DyuLTqLs.js.map +0 -1
  30. package/dist/css-DkSyTW67.js +0 -1773
  31. package/dist/css-DkSyTW67.js.map +0 -1
  32. package/dist/cypher-Dlu_3r4V.js +0 -122
  33. package/dist/cypher-Dlu_3r4V.js.map +0 -1
  34. package/dist/d-UURgV0Ux.js +0 -180
  35. package/dist/d-UURgV0Ux.js.map +0 -1
  36. package/dist/diff-B_Bi2Crb.js +0 -26
  37. package/dist/diff-B_Bi2Crb.js.map +0 -1
  38. package/dist/dockerfile-Bvk733Ga.js +0 -202
  39. package/dist/dockerfile-Bvk733Ga.js.map +0 -1
  40. package/dist/dtd-Dy74G54E.js +0 -115
  41. package/dist/dtd-Dy74G54E.js.map +0 -1
  42. package/dist/dylan-TSb-Nfix.js +0 -315
  43. package/dist/dylan-TSb-Nfix.js.map +0 -1
  44. package/dist/ebnf-4fKAGW3a.js +0 -141
  45. package/dist/ebnf-4fKAGW3a.js.map +0 -1
  46. package/dist/ecl-B59qGGVg.js +0 -179
  47. package/dist/ecl-B59qGGVg.js.map +0 -1
  48. package/dist/eiffel-Dze7nlu3.js +0 -135
  49. package/dist/eiffel-Dze7nlu3.js.map +0 -1
  50. package/dist/elm-DG7jkhNZ.js +0 -177
  51. package/dist/elm-DG7jkhNZ.js.map +0 -1
  52. package/dist/erlang-BO6gOnGA.js +0 -675
  53. package/dist/erlang-BO6gOnGA.js.map +0 -1
  54. package/dist/factor-CMxFHDqz.js +0 -66
  55. package/dist/factor-CMxFHDqz.js.map +0 -1
  56. package/dist/fcl-CDDUNjTj.js +0 -142
  57. package/dist/fcl-CDDUNjTj.js.map +0 -1
  58. package/dist/forth-B9D2JCeE.js +0 -117
  59. package/dist/forth-B9D2JCeE.js.map +0 -1
  60. package/dist/fortran-CAG2BFbe.js +0 -468
  61. package/dist/fortran-CAG2BFbe.js.map +0 -1
  62. package/dist/gas-0Aw8zDr5.js +0 -294
  63. package/dist/gas-0Aw8zDr5.js.map +0 -1
  64. package/dist/gherkin-DhZlEZiy.js +0 -116
  65. package/dist/gherkin-DhZlEZiy.js.map +0 -1
  66. package/dist/gjs-DfguZDLq.js +0 -173
  67. package/dist/gjs-DfguZDLq.js.map +0 -1
  68. package/dist/gmd-Yas-Oo8k.js +0 -163
  69. package/dist/gmd-Yas-Oo8k.js.map +0 -1
  70. package/dist/groovy-CpwJiBl7.js +0 -224
  71. package/dist/groovy-CpwJiBl7.js.map +0 -1
  72. package/dist/haskell-ySd-OUo8.js +0 -460
  73. package/dist/haskell-ySd-OUo8.js.map +0 -1
  74. package/dist/haxe-7MlzfeYV.js +0 -515
  75. package/dist/haxe-7MlzfeYV.js.map +0 -1
  76. package/dist/hbs-CxcmWxSJ.js +0 -62
  77. package/dist/hbs-CxcmWxSJ.js.map +0 -1
  78. package/dist/http-BqypyemW.js +0 -80
  79. package/dist/http-BqypyemW.js.map +0 -1
  80. package/dist/idl-4HIGJlDI.js +0 -986
  81. package/dist/idl-4HIGJlDI.js.map +0 -1
  82. package/dist/index-B3Meoznj.js +0 -118
  83. package/dist/index-B3Meoznj.js.map +0 -1
  84. package/dist/index-BQyfDUUx.js +0 -692
  85. package/dist/index-BQyfDUUx.js.map +0 -1
  86. package/dist/index-BRDroAD8.js +0 -305
  87. package/dist/index-BRDroAD8.js.map +0 -1
  88. package/dist/index-BRMAzRyM.js +0 -179
  89. package/dist/index-BRMAzRyM.js.map +0 -1
  90. package/dist/index-Bb8uYQgv.js +0 -927
  91. package/dist/index-Bb8uYQgv.js.map +0 -1
  92. package/dist/index-BlOjO66K.js +0 -17618
  93. package/dist/index-BlOjO66K.js.map +0 -1
  94. package/dist/index-BoGWnSNL.js +0 -706
  95. package/dist/index-BoGWnSNL.js.map +0 -1
  96. package/dist/index-BsRrEiOu.js +0 -98
  97. package/dist/index-BsRrEiOu.js.map +0 -1
  98. package/dist/index-C2sFZMth.js +0 -391
  99. package/dist/index-C2sFZMth.js.map +0 -1
  100. package/dist/index-C7xwOjmS.js +0 -291
  101. package/dist/index-C7xwOjmS.js.map +0 -1
  102. package/dist/index-CA3lFUx6.js +0 -315
  103. package/dist/index-CA3lFUx6.js.map +0 -1
  104. package/dist/index-CB-pPTIf.js +0 -98
  105. package/dist/index-CB-pPTIf.js.map +0 -1
  106. package/dist/index-CCa6x1FE.js +0 -386
  107. package/dist/index-CCa6x1FE.js.map +0 -1
  108. package/dist/index-CD4DINI1.js +0 -158
  109. package/dist/index-CD4DINI1.js.map +0 -1
  110. package/dist/index-CE0B_fcG.js +0 -328
  111. package/dist/index-CE0B_fcG.js.map +0 -1
  112. package/dist/index-CVGAEPMV.js +0 -2139
  113. package/dist/index-CVGAEPMV.js.map +0 -1
  114. package/dist/index-CmaT2afn.js +0 -332
  115. package/dist/index-CmaT2afn.js.map +0 -1
  116. package/dist/index-D8sUxXp5.js +0 -83
  117. package/dist/index-D8sUxXp5.js.map +0 -1
  118. package/dist/index-DIz8Vpn-.js +0 -737
  119. package/dist/index-DIz8Vpn-.js.map +0 -1
  120. package/dist/index-DNP1xT-S.js +0 -408
  121. package/dist/index-DNP1xT-S.js.map +0 -1
  122. package/dist/index-DOAqdvnQ.js +0 -862
  123. package/dist/index-DOAqdvnQ.js.map +0 -1
  124. package/dist/index-DVUMFbgi.js +0 -152
  125. package/dist/index-DVUMFbgi.js.map +0 -1
  126. package/dist/index-VeTBKRVd.js +0 -83
  127. package/dist/index-VeTBKRVd.js.map +0 -1
  128. package/dist/index-dXZeR7Bx.js +0 -1767
  129. package/dist/index-dXZeR7Bx.js.map +0 -1
  130. package/dist/index-gtqbIb6T.js +0 -62
  131. package/dist/index-gtqbIb6T.js.map +0 -1
  132. package/dist/index-pN_pUAQ7.js +0 -2426
  133. package/dist/index-pN_pUAQ7.js.map +0 -1
  134. package/dist/index-wasu5VX0.js +0 -1150
  135. package/dist/index-wasu5VX0.js.map +0 -1
  136. package/dist/javascript-Bt8B7yTi.js +0 -993
  137. package/dist/javascript-Bt8B7yTi.js.map +0 -1
  138. package/dist/julia-Bs6JJhYG.js +0 -408
  139. package/dist/julia-Bs6JJhYG.js.map +0 -1
  140. package/dist/livescript-DmzgM3Yt.js +0 -297
  141. package/dist/livescript-DmzgM3Yt.js.map +0 -1
  142. package/dist/lua-8cJgIlqe.js +0 -257
  143. package/dist/lua-8cJgIlqe.js.map +0 -1
  144. package/dist/mathematica-DNLOL9PQ.js +0 -111
  145. package/dist/mathematica-DNLOL9PQ.js.map +0 -1
  146. package/dist/mbox-Ga7d4MMN.js +0 -118
  147. package/dist/mbox-Ga7d4MMN.js.map +0 -1
  148. package/dist/mirc-Dma3B8rS.js +0 -108
  149. package/dist/mirc-Dma3B8rS.js.map +0 -1
  150. package/dist/mllike-DHn7xckP.js +0 -335
  151. package/dist/mllike-DHn7xckP.js.map +0 -1
  152. package/dist/modelica-0d55jYY0.js +0 -148
  153. package/dist/modelica-0d55jYY0.js.map +0 -1
  154. package/dist/mscgen-DdqZYINH.js +0 -136
  155. package/dist/mscgen-DdqZYINH.js.map +0 -1
  156. package/dist/mumps-Btr8VblO.js +0 -94
  157. package/dist/mumps-Btr8VblO.js.map +0 -1
  158. package/dist/nginx-DTDtBDVN.js +0 -142
  159. package/dist/nginx-DTDtBDVN.js.map +0 -1
  160. package/dist/nsis-3zG7tgur.js +0 -63
  161. package/dist/nsis-3zG7tgur.js.map +0 -1
  162. package/dist/ntriples-CvgOYMpL.js +0 -154
  163. package/dist/ntriples-CvgOYMpL.js.map +0 -1
  164. package/dist/octave-DYBj3-tl.js +0 -201
  165. package/dist/octave-DYBj3-tl.js.map +0 -1
  166. package/dist/oz-R_e8WMIi.js +0 -232
  167. package/dist/oz-R_e8WMIi.js.map +0 -1
  168. package/dist/parse-CAqQaKsh.js +0 -21685
  169. package/dist/parse-CAqQaKsh.js.map +0 -1
  170. package/dist/pascal-GD8iposT.js +0 -106
  171. package/dist/pascal-GD8iposT.js.map +0 -1
  172. package/dist/perl-DL9mHpoi.js +0 -1106
  173. package/dist/perl-DL9mHpoi.js.map +0 -1
  174. package/dist/pig-C_4T4YIV.js +0 -102
  175. package/dist/pig-C_4T4YIV.js.map +0 -1
  176. package/dist/powershell-B0suO7Vd.js +0 -329
  177. package/dist/powershell-B0suO7Vd.js.map +0 -1
  178. package/dist/properties-BR-vP1aU.js +0 -59
  179. package/dist/properties-BR-vP1aU.js.map +0 -1
  180. package/dist/protobuf-BxgpyhoW.js +0 -78
  181. package/dist/protobuf-BxgpyhoW.js.map +0 -1
  182. package/dist/pug-vHnWR0UE.js +0 -406
  183. package/dist/pug-vHnWR0UE.js.map +0 -1
  184. package/dist/puppet-Bdao66PW.js +0 -138
  185. package/dist/puppet-Bdao66PW.js.map +0 -1
  186. package/dist/python-BFGRmuZ9.js +0 -427
  187. package/dist/python-BFGRmuZ9.js.map +0 -1
  188. package/dist/q-CrbCVq4a.js +0 -132
  189. package/dist/q-CrbCVq4a.js.map +0 -1
  190. package/dist/r-V7nswm59.js +0 -171
  191. package/dist/r-V7nswm59.js.map +0 -1
  192. package/dist/render-app-island-B-i8rvGi.js +0 -61
  193. package/dist/render-app-island-B-i8rvGi.js.map +0 -1
  194. package/dist/repl-sdk.js +0 -7
  195. package/dist/repl-sdk.js.map +0 -1
  196. package/dist/rpm-C-DLY-If.js +0 -110
  197. package/dist/rpm-C-DLY-If.js.map +0 -1
  198. package/dist/ruby-JDKLJNK0.js +0 -331
  199. package/dist/ruby-JDKLJNK0.js.map +0 -1
  200. package/dist/sas-D2UG-yhZ.js +0 -208
  201. package/dist/sas-D2UG-yhZ.js.map +0 -1
  202. package/dist/scheme-BKzrkGJD.js +0 -223
  203. package/dist/scheme-BKzrkGJD.js.map +0 -1
  204. package/dist/shell-BlsXDxCn.js +0 -223
  205. package/dist/shell-BlsXDxCn.js.map +0 -1
  206. package/dist/sieve-CjwBwOY5.js +0 -136
  207. package/dist/sieve-CjwBwOY5.js.map +0 -1
  208. package/dist/simple-mode-DMneyfDu.js +0 -131
  209. package/dist/simple-mode-DMneyfDu.js.map +0 -1
  210. package/dist/smalltalk-BOIGQuhN.js +0 -122
  211. package/dist/smalltalk-BOIGQuhN.js.map +0 -1
  212. package/dist/solr-CwD7U71z.js +0 -70
  213. package/dist/solr-CwD7U71z.js.map +0 -1
  214. package/dist/sparql-DYskk2vE.js +0 -250
  215. package/dist/sparql-DYskk2vE.js.map +0 -1
  216. package/dist/spreadsheet-Bgtt3oLP.js +0 -88
  217. package/dist/spreadsheet-Bgtt3oLP.js.map +0 -1
  218. package/dist/sql-Cei9CMfk.js +0 -343
  219. package/dist/sql-Cei9CMfk.js.map +0 -1
  220. package/dist/stex-C1nZSzAw.js +0 -231
  221. package/dist/stex-C1nZSzAw.js.map +0 -1
  222. package/dist/stylus-BkS-boTH.js +0 -566
  223. package/dist/stylus-BkS-boTH.js.map +0 -1
  224. package/dist/swift-FRZi1uvB.js +0 -292
  225. package/dist/swift-FRZi1uvB.js.map +0 -1
  226. package/dist/tcl-CUcaCdmq.js +0 -115
  227. package/dist/tcl-CUcaCdmq.js.map +0 -1
  228. package/dist/textile-BnFpjsrl.js +0 -415
  229. package/dist/textile-BnFpjsrl.js.map +0 -1
  230. package/dist/tiddlywiki-CjprD-Qp.js +0 -219
  231. package/dist/tiddlywiki-CjprD-Qp.js.map +0 -1
  232. package/dist/tiki-DK9DOeWn.js +0 -269
  233. package/dist/tiki-DK9DOeWn.js.map +0 -1
  234. package/dist/toml-BOuWGMcf.js +0 -77
  235. package/dist/toml-BOuWGMcf.js.map +0 -1
  236. package/dist/troff-E1bJ0PPL.js +0 -62
  237. package/dist/troff-E1bJ0PPL.js.map +0 -1
  238. package/dist/ttcn-cfg-Dc39-fIP.js +0 -134
  239. package/dist/ttcn-cfg-Dc39-fIP.js.map +0 -1
  240. package/dist/ttcn-tKd4HLu4.js +0 -193
  241. package/dist/ttcn-tKd4HLu4.js.map +0 -1
  242. package/dist/turtle-Dq7-1WAf.js +0 -125
  243. package/dist/turtle-Dq7-1WAf.js.map +0 -1
  244. package/dist/vb-Dp90gtsv.js +0 -197
  245. package/dist/vb-Dp90gtsv.js.map +0 -1
  246. package/dist/vbscript-Bfn8O8I7.js +0 -479
  247. package/dist/vbscript-Bfn8O8I7.js.map +0 -1
  248. package/dist/velocity-BwIZK1TH.js +0 -150
  249. package/dist/velocity-BwIZK1TH.js.map +0 -1
  250. package/dist/verilog-CnT9bMk0.js +0 -430
  251. package/dist/verilog-CnT9bMk0.js.map +0 -1
  252. package/dist/vhdl-DCkMIyT9.js +0 -159
  253. package/dist/vhdl-DCkMIyT9.js.map +0 -1
  254. package/dist/webidl-BTLTThCm.js +0 -205
  255. package/dist/webidl-BTLTThCm.js.map +0 -1
  256. package/dist/xquery-BrBUuxMR.js +0 -526
  257. package/dist/xquery-BrBUuxMR.js.map +0 -1
  258. package/dist/yacas-b5lAVEIl.js +0 -131
  259. package/dist/yacas-b5lAVEIl.js.map +0 -1
  260. package/dist/z80-ClgwfNdB.js +0 -93
  261. package/dist/z80-ClgwfNdB.js.map +0 -1
@@ -1,1106 +0,0 @@
1
- function look(stream, c) {
2
- return stream.string.charAt(stream.pos + (c || 0));
3
- }
4
- function prefix(stream, c) {
5
- if (c) {
6
- var x = stream.pos - c;
7
- return stream.string.substr(x >= 0 ? x : 0, c);
8
- } else {
9
- return stream.string.substr(0, stream.pos - 1);
10
- }
11
- }
12
- function suffix(stream, c) {
13
- var y = stream.string.length;
14
- var x = y - stream.pos + 1;
15
- return stream.string.substr(stream.pos, c && c < y ? c : x);
16
- }
17
- function eatSuffix(stream, c) {
18
- var x = stream.pos + c;
19
- var y;
20
- if (x <= 0)
21
- stream.pos = 0;
22
- else if (x >= (y = stream.string.length - 1))
23
- stream.pos = y;
24
- else
25
- stream.pos = x;
26
- }
27
- var PERL = {
28
- // null - magic touch
29
- // 1 - keyword
30
- // 2 - def
31
- // 3 - atom
32
- // 4 - operator
33
- // 5 - builtin (predefined)
34
- // [x,y] - x=1,2,3; y=must be defined if x{...}
35
- // PERL operators
36
- "->": 4,
37
- "++": 4,
38
- "--": 4,
39
- "**": 4,
40
- // ! ~ \ and unary + and -
41
- "=~": 4,
42
- "!~": 4,
43
- "*": 4,
44
- "/": 4,
45
- "%": 4,
46
- "x": 4,
47
- "+": 4,
48
- "-": 4,
49
- ".": 4,
50
- "<<": 4,
51
- ">>": 4,
52
- // named unary operators
53
- "<": 4,
54
- ">": 4,
55
- "<=": 4,
56
- ">=": 4,
57
- "lt": 4,
58
- "gt": 4,
59
- "le": 4,
60
- "ge": 4,
61
- "==": 4,
62
- "!=": 4,
63
- "<=>": 4,
64
- "eq": 4,
65
- "ne": 4,
66
- "cmp": 4,
67
- "~~": 4,
68
- "&": 4,
69
- "|": 4,
70
- "^": 4,
71
- "&&": 4,
72
- "||": 4,
73
- "//": 4,
74
- "..": 4,
75
- "...": 4,
76
- "?": 4,
77
- ":": 4,
78
- "=": 4,
79
- "+=": 4,
80
- "-=": 4,
81
- "*=": 4,
82
- // etc. ???
83
- ",": 4,
84
- "=>": 4,
85
- "::": 4,
86
- // list operators (rightward)
87
- "not": 4,
88
- "and": 4,
89
- "or": 4,
90
- "xor": 4,
91
- // PERL predefined variables (I know, what this is a paranoid idea, but may be needed for people, who learn PERL, and for me as well, ...and may be for you?;)
92
- "BEGIN": [5, 1],
93
- "END": [5, 1],
94
- "PRINT": [5, 1],
95
- "PRINTF": [5, 1],
96
- "GETC": [5, 1],
97
- "READ": [5, 1],
98
- "READLINE": [5, 1],
99
- "DESTROY": [5, 1],
100
- "TIE": [5, 1],
101
- "TIEHANDLE": [5, 1],
102
- "UNTIE": [5, 1],
103
- "STDIN": 5,
104
- "STDIN_TOP": 5,
105
- "STDOUT": 5,
106
- "STDOUT_TOP": 5,
107
- "STDERR": 5,
108
- "STDERR_TOP": 5,
109
- "$ARG": 5,
110
- "$_": 5,
111
- "@ARG": 5,
112
- "@_": 5,
113
- "$LIST_SEPARATOR": 5,
114
- '$"': 5,
115
- "$PROCESS_ID": 5,
116
- "$PID": 5,
117
- "$$": 5,
118
- "$REAL_GROUP_ID": 5,
119
- "$GID": 5,
120
- "$(": 5,
121
- "$EFFECTIVE_GROUP_ID": 5,
122
- "$EGID": 5,
123
- "$)": 5,
124
- "$PROGRAM_NAME": 5,
125
- "$0": 5,
126
- "$SUBSCRIPT_SEPARATOR": 5,
127
- "$SUBSEP": 5,
128
- "$;": 5,
129
- "$REAL_USER_ID": 5,
130
- "$UID": 5,
131
- "$<": 5,
132
- "$EFFECTIVE_USER_ID": 5,
133
- "$EUID": 5,
134
- "$>": 5,
135
- "$a": 5,
136
- "$b": 5,
137
- "$COMPILING": 5,
138
- "$^C": 5,
139
- "$DEBUGGING": 5,
140
- "$^D": 5,
141
- "${^ENCODING}": 5,
142
- "$ENV": 5,
143
- "%ENV": 5,
144
- "$SYSTEM_FD_MAX": 5,
145
- "$^F": 5,
146
- "@F": 5,
147
- "${^GLOBAL_PHASE}": 5,
148
- "$^H": 5,
149
- "%^H": 5,
150
- "@INC": 5,
151
- "%INC": 5,
152
- "$INPLACE_EDIT": 5,
153
- "$^I": 5,
154
- "$^M": 5,
155
- "$OSNAME": 5,
156
- "$^O": 5,
157
- "${^OPEN}": 5,
158
- "$PERLDB": 5,
159
- "$^P": 5,
160
- "$SIG": 5,
161
- "%SIG": 5,
162
- "$BASETIME": 5,
163
- "$^T": 5,
164
- "${^TAINT}": 5,
165
- "${^UNICODE}": 5,
166
- "${^UTF8CACHE}": 5,
167
- "${^UTF8LOCALE}": 5,
168
- "$PERL_VERSION": 5,
169
- "$^V": 5,
170
- "${^WIN32_SLOPPY_STAT}": 5,
171
- "$EXECUTABLE_NAME": 5,
172
- "$^X": 5,
173
- "$1": 5,
174
- // - regexp $1, $2...
175
- "$MATCH": 5,
176
- "$&": 5,
177
- "${^MATCH}": 5,
178
- "$PREMATCH": 5,
179
- "$`": 5,
180
- "${^PREMATCH}": 5,
181
- "$POSTMATCH": 5,
182
- "$'": 5,
183
- "${^POSTMATCH}": 5,
184
- "$LAST_PAREN_MATCH": 5,
185
- "$+": 5,
186
- "$LAST_SUBMATCH_RESULT": 5,
187
- "$^N": 5,
188
- "@LAST_MATCH_END": 5,
189
- "@+": 5,
190
- "%LAST_PAREN_MATCH": 5,
191
- "%+": 5,
192
- "@LAST_MATCH_START": 5,
193
- "@-": 5,
194
- "%LAST_MATCH_START": 5,
195
- "%-": 5,
196
- "$LAST_REGEXP_CODE_RESULT": 5,
197
- "$^R": 5,
198
- "${^RE_DEBUG_FLAGS}": 5,
199
- "${^RE_TRIE_MAXBUF}": 5,
200
- "$ARGV": 5,
201
- "@ARGV": 5,
202
- "ARGV": 5,
203
- "ARGVOUT": 5,
204
- "$OUTPUT_FIELD_SEPARATOR": 5,
205
- "$OFS": 5,
206
- "$,": 5,
207
- "$INPUT_LINE_NUMBER": 5,
208
- "$NR": 5,
209
- "$.": 5,
210
- "$INPUT_RECORD_SEPARATOR": 5,
211
- "$RS": 5,
212
- "$/": 5,
213
- "$OUTPUT_RECORD_SEPARATOR": 5,
214
- "$ORS": 5,
215
- "$\\": 5,
216
- "$OUTPUT_AUTOFLUSH": 5,
217
- "$|": 5,
218
- "$ACCUMULATOR": 5,
219
- "$^A": 5,
220
- "$FORMAT_FORMFEED": 5,
221
- "$^L": 5,
222
- "$FORMAT_PAGE_NUMBER": 5,
223
- "$%": 5,
224
- "$FORMAT_LINES_LEFT": 5,
225
- "$-": 5,
226
- "$FORMAT_LINE_BREAK_CHARACTERS": 5,
227
- "$:": 5,
228
- "$FORMAT_LINES_PER_PAGE": 5,
229
- "$=": 5,
230
- "$FORMAT_TOP_NAME": 5,
231
- "$^": 5,
232
- "$FORMAT_NAME": 5,
233
- "$~": 5,
234
- "${^CHILD_ERROR_NATIVE}": 5,
235
- "$EXTENDED_OS_ERROR": 5,
236
- "$^E": 5,
237
- "$EXCEPTIONS_BEING_CAUGHT": 5,
238
- "$^S": 5,
239
- "$WARNING": 5,
240
- "$^W": 5,
241
- "${^WARNING_BITS}": 5,
242
- "$OS_ERROR": 5,
243
- "$ERRNO": 5,
244
- "$!": 5,
245
- "%OS_ERROR": 5,
246
- "%ERRNO": 5,
247
- "%!": 5,
248
- "$CHILD_ERROR": 5,
249
- "$?": 5,
250
- "$EVAL_ERROR": 5,
251
- "$@": 5,
252
- "$OFMT": 5,
253
- "$#": 5,
254
- "$*": 5,
255
- "$ARRAY_BASE": 5,
256
- "$[": 5,
257
- "$OLD_PERL_VERSION": 5,
258
- "$]": 5,
259
- // PERL blocks
260
- "if": [1, 1],
261
- elsif: [1, 1],
262
- "else": [1, 1],
263
- "while": [1, 1],
264
- unless: [1, 1],
265
- "for": [1, 1],
266
- foreach: [1, 1],
267
- // PERL functions
268
- "abs": 1,
269
- // - absolute value function
270
- accept: 1,
271
- // - accept an incoming socket connect
272
- alarm: 1,
273
- // - schedule a SIGALRM
274
- "atan2": 1,
275
- // - arctangent of Y/X in the range -PI to PI
276
- bind: 1,
277
- // - binds an address to a socket
278
- binmode: 1,
279
- // - prepare binary files for I/O
280
- bless: 1,
281
- // - create an object
282
- bootstrap: 1,
283
- //
284
- "break": 1,
285
- // - break out of a "given" block
286
- caller: 1,
287
- // - get context of the current subroutine call
288
- chdir: 1,
289
- // - change your current working directory
290
- chmod: 1,
291
- // - changes the permissions on a list of files
292
- chomp: 1,
293
- // - remove a trailing record separator from a string
294
- chop: 1,
295
- // - remove the last character from a string
296
- chown: 1,
297
- // - change the ownership on a list of files
298
- chr: 1,
299
- // - get character this number represents
300
- chroot: 1,
301
- // - make directory new root for path lookups
302
- close: 1,
303
- // - close file (or pipe or socket) handle
304
- closedir: 1,
305
- // - close directory handle
306
- connect: 1,
307
- // - connect to a remote socket
308
- "continue": [1, 1],
309
- // - optional trailing block in a while or foreach
310
- "cos": 1,
311
- // - cosine function
312
- crypt: 1,
313
- // - one-way passwd-style encryption
314
- dbmclose: 1,
315
- // - breaks binding on a tied dbm file
316
- dbmopen: 1,
317
- // - create binding on a tied dbm file
318
- "default": 1,
319
- //
320
- defined: 1,
321
- // - test whether a value, variable, or function is defined
322
- "delete": 1,
323
- // - deletes a value from a hash
324
- die: 1,
325
- // - raise an exception or bail out
326
- "do": 1,
327
- // - turn a BLOCK into a TERM
328
- dump: 1,
329
- // - create an immediate core dump
330
- each: 1,
331
- // - retrieve the next key/value pair from a hash
332
- endgrent: 1,
333
- // - be done using group file
334
- endhostent: 1,
335
- // - be done using hosts file
336
- endnetent: 1,
337
- // - be done using networks file
338
- endprotoent: 1,
339
- // - be done using protocols file
340
- endpwent: 1,
341
- // - be done using passwd file
342
- endservent: 1,
343
- // - be done using services file
344
- eof: 1,
345
- // - test a filehandle for its end
346
- "eval": 1,
347
- // - catch exceptions or compile and run code
348
- "exec": 1,
349
- // - abandon this program to run another
350
- exists: 1,
351
- // - test whether a hash key is present
352
- exit: 1,
353
- // - terminate this program
354
- "exp": 1,
355
- // - raise I to a power
356
- fcntl: 1,
357
- // - file control system call
358
- fileno: 1,
359
- // - return file descriptor from filehandle
360
- flock: 1,
361
- // - lock an entire file with an advisory lock
362
- fork: 1,
363
- // - create a new process just like this one
364
- format: 1,
365
- // - declare a picture format with use by the write() function
366
- formline: 1,
367
- // - internal function used for formats
368
- getc: 1,
369
- // - get the next character from the filehandle
370
- getgrent: 1,
371
- // - get next group record
372
- getgrgid: 1,
373
- // - get group record given group user ID
374
- getgrnam: 1,
375
- // - get group record given group name
376
- gethostbyaddr: 1,
377
- // - get host record given its address
378
- gethostbyname: 1,
379
- // - get host record given name
380
- gethostent: 1,
381
- // - get next hosts record
382
- getlogin: 1,
383
- // - return who logged in at this tty
384
- getnetbyaddr: 1,
385
- // - get network record given its address
386
- getnetbyname: 1,
387
- // - get networks record given name
388
- getnetent: 1,
389
- // - get next networks record
390
- getpeername: 1,
391
- // - find the other end of a socket connection
392
- getpgrp: 1,
393
- // - get process group
394
- getppid: 1,
395
- // - get parent process ID
396
- getpriority: 1,
397
- // - get current nice value
398
- getprotobyname: 1,
399
- // - get protocol record given name
400
- getprotobynumber: 1,
401
- // - get protocol record numeric protocol
402
- getprotoent: 1,
403
- // - get next protocols record
404
- getpwent: 1,
405
- // - get next passwd record
406
- getpwnam: 1,
407
- // - get passwd record given user login name
408
- getpwuid: 1,
409
- // - get passwd record given user ID
410
- getservbyname: 1,
411
- // - get services record given its name
412
- getservbyport: 1,
413
- // - get services record given numeric port
414
- getservent: 1,
415
- // - get next services record
416
- getsockname: 1,
417
- // - retrieve the sockaddr for a given socket
418
- getsockopt: 1,
419
- // - get socket options on a given socket
420
- given: 1,
421
- //
422
- glob: 1,
423
- // - expand filenames using wildcards
424
- gmtime: 1,
425
- // - convert UNIX time into record or string using Greenwich time
426
- "goto": 1,
427
- // - create spaghetti code
428
- grep: 1,
429
- // - locate elements in a list test true against a given criterion
430
- hex: 1,
431
- // - convert a string to a hexadecimal number
432
- "import": 1,
433
- // - patch a module's namespace into your own
434
- index: 1,
435
- // - find a substring within a string
436
- "int": 1,
437
- // - get the integer portion of a number
438
- ioctl: 1,
439
- // - system-dependent device control system call
440
- "join": 1,
441
- // - join a list into a string using a separator
442
- keys: 1,
443
- // - retrieve list of indices from a hash
444
- kill: 1,
445
- // - send a signal to a process or process group
446
- last: 1,
447
- // - exit a block prematurely
448
- lc: 1,
449
- // - return lower-case version of a string
450
- lcfirst: 1,
451
- // - return a string with just the next letter in lower case
452
- length: 1,
453
- // - return the number of bytes in a string
454
- "link": 1,
455
- // - create a hard link in the filesystem
456
- listen: 1,
457
- // - register your socket as a server
458
- local: 2,
459
- // - create a temporary value for a global variable (dynamic scoping)
460
- localtime: 1,
461
- // - convert UNIX time into record or string using local time
462
- lock: 1,
463
- // - get a thread lock on a variable, subroutine, or method
464
- "log": 1,
465
- // - retrieve the natural logarithm for a number
466
- lstat: 1,
467
- // - stat a symbolic link
468
- m: null,
469
- // - match a string with a regular expression pattern
470
- map: 1,
471
- // - apply a change to a list to get back a new list with the changes
472
- mkdir: 1,
473
- // - create a directory
474
- msgctl: 1,
475
- // - SysV IPC message control operations
476
- msgget: 1,
477
- // - get SysV IPC message queue
478
- msgrcv: 1,
479
- // - receive a SysV IPC message from a message queue
480
- msgsnd: 1,
481
- // - send a SysV IPC message to a message queue
482
- my: 2,
483
- // - declare and assign a local variable (lexical scoping)
484
- "new": 1,
485
- //
486
- next: 1,
487
- // - iterate a block prematurely
488
- no: 1,
489
- // - unimport some module symbols or semantics at compile time
490
- oct: 1,
491
- // - convert a string to an octal number
492
- open: 1,
493
- // - open a file, pipe, or descriptor
494
- opendir: 1,
495
- // - open a directory
496
- ord: 1,
497
- // - find a character's numeric representation
498
- our: 2,
499
- // - declare and assign a package variable (lexical scoping)
500
- pack: 1,
501
- // - convert a list into a binary representation
502
- "package": 1,
503
- // - declare a separate global namespace
504
- pipe: 1,
505
- // - open a pair of connected filehandles
506
- pop: 1,
507
- // - remove the last element from an array and return it
508
- pos: 1,
509
- // - find or set the offset for the last/next m//g search
510
- print: 1,
511
- // - output a list to a filehandle
512
- printf: 1,
513
- // - output a formatted list to a filehandle
514
- prototype: 1,
515
- // - get the prototype (if any) of a subroutine
516
- push: 1,
517
- // - append one or more elements to an array
518
- q: null,
519
- // - singly quote a string
520
- qq: null,
521
- // - doubly quote a string
522
- qr: null,
523
- // - Compile pattern
524
- quotemeta: null,
525
- // - quote regular expression magic characters
526
- qw: null,
527
- // - quote a list of words
528
- qx: null,
529
- // - backquote quote a string
530
- rand: 1,
531
- // - retrieve the next pseudorandom number
532
- read: 1,
533
- // - fixed-length buffered input from a filehandle
534
- readdir: 1,
535
- // - get a directory from a directory handle
536
- readline: 1,
537
- // - fetch a record from a file
538
- readlink: 1,
539
- // - determine where a symbolic link is pointing
540
- readpipe: 1,
541
- // - execute a system command and collect standard output
542
- recv: 1,
543
- // - receive a message over a Socket
544
- redo: 1,
545
- // - start this loop iteration over again
546
- ref: 1,
547
- // - find out the type of thing being referenced
548
- rename: 1,
549
- // - change a filename
550
- require: 1,
551
- // - load in external functions from a library at runtime
552
- reset: 1,
553
- // - clear all variables of a given name
554
- "return": 1,
555
- // - get out of a function early
556
- reverse: 1,
557
- // - flip a string or a list
558
- rewinddir: 1,
559
- // - reset directory handle
560
- rindex: 1,
561
- // - right-to-left substring search
562
- rmdir: 1,
563
- // - remove a directory
564
- s: null,
565
- // - replace a pattern with a string
566
- say: 1,
567
- // - print with newline
568
- scalar: 1,
569
- // - force a scalar context
570
- seek: 1,
571
- // - reposition file pointer for random-access I/O
572
- seekdir: 1,
573
- // - reposition directory pointer
574
- select: 1,
575
- // - reset default output or do I/O multiplexing
576
- semctl: 1,
577
- // - SysV semaphore control operations
578
- semget: 1,
579
- // - get set of SysV semaphores
580
- semop: 1,
581
- // - SysV semaphore operations
582
- send: 1,
583
- // - send a message over a socket
584
- setgrent: 1,
585
- // - prepare group file for use
586
- sethostent: 1,
587
- // - prepare hosts file for use
588
- setnetent: 1,
589
- // - prepare networks file for use
590
- setpgrp: 1,
591
- // - set the process group of a process
592
- setpriority: 1,
593
- // - set a process's nice value
594
- setprotoent: 1,
595
- // - prepare protocols file for use
596
- setpwent: 1,
597
- // - prepare passwd file for use
598
- setservent: 1,
599
- // - prepare services file for use
600
- setsockopt: 1,
601
- // - set some socket options
602
- shift: 1,
603
- // - remove the first element of an array, and return it
604
- shmctl: 1,
605
- // - SysV shared memory operations
606
- shmget: 1,
607
- // - get SysV shared memory segment identifier
608
- shmread: 1,
609
- // - read SysV shared memory
610
- shmwrite: 1,
611
- // - write SysV shared memory
612
- shutdown: 1,
613
- // - close down just half of a socket connection
614
- "sin": 1,
615
- // - return the sine of a number
616
- sleep: 1,
617
- // - block for some number of seconds
618
- socket: 1,
619
- // - create a socket
620
- socketpair: 1,
621
- // - create a pair of sockets
622
- "sort": 1,
623
- // - sort a list of values
624
- splice: 1,
625
- // - add or remove elements anywhere in an array
626
- "split": 1,
627
- // - split up a string using a regexp delimiter
628
- sprintf: 1,
629
- // - formatted print into a string
630
- "sqrt": 1,
631
- // - square root function
632
- srand: 1,
633
- // - seed the random number generator
634
- stat: 1,
635
- // - get a file's status information
636
- state: 1,
637
- // - declare and assign a state variable (persistent lexical scoping)
638
- study: 1,
639
- // - optimize input data for repeated searches
640
- "sub": 1,
641
- // - declare a subroutine, possibly anonymously
642
- "substr": 1,
643
- // - get or alter a portion of a string
644
- symlink: 1,
645
- // - create a symbolic link to a file
646
- syscall: 1,
647
- // - execute an arbitrary system call
648
- sysopen: 1,
649
- // - open a file, pipe, or descriptor
650
- sysread: 1,
651
- // - fixed-length unbuffered input from a filehandle
652
- sysseek: 1,
653
- // - position I/O pointer on handle used with sysread and syswrite
654
- system: 1,
655
- // - run a separate program
656
- syswrite: 1,
657
- // - fixed-length unbuffered output to a filehandle
658
- tell: 1,
659
- // - get current seekpointer on a filehandle
660
- telldir: 1,
661
- // - get current seekpointer on a directory handle
662
- tie: 1,
663
- // - bind a variable to an object class
664
- tied: 1,
665
- // - get a reference to the object underlying a tied variable
666
- time: 1,
667
- // - return number of seconds since 1970
668
- times: 1,
669
- // - return elapsed time for self and child processes
670
- tr: null,
671
- // - transliterate a string
672
- truncate: 1,
673
- // - shorten a file
674
- uc: 1,
675
- // - return upper-case version of a string
676
- ucfirst: 1,
677
- // - return a string with just the next letter in upper case
678
- umask: 1,
679
- // - set file creation mode mask
680
- undef: 1,
681
- // - remove a variable or function definition
682
- unlink: 1,
683
- // - remove one link to a file
684
- unpack: 1,
685
- // - convert binary structure into normal perl variables
686
- unshift: 1,
687
- // - prepend more elements to the beginning of a list
688
- untie: 1,
689
- // - break a tie binding to a variable
690
- use: 1,
691
- // - load in a module at compile time
692
- utime: 1,
693
- // - set a file's last access and modify times
694
- values: 1,
695
- // - return a list of the values in a hash
696
- vec: 1,
697
- // - test or set particular bits in a string
698
- wait: 1,
699
- // - wait for any child process to die
700
- waitpid: 1,
701
- // - wait for a particular child process to die
702
- wantarray: 1,
703
- // - get void vs scalar vs list context of current subroutine call
704
- warn: 1,
705
- // - print debugging info
706
- when: 1,
707
- //
708
- write: 1,
709
- // - print a picture record
710
- y: null
711
- };
712
- var RXstyle = "string.special";
713
- var RXmodifiers = /[goseximacplud]/;
714
- function tokenChain(stream, state, chain, style, tail) {
715
- state.chain = null;
716
- state.style = null;
717
- state.tail = null;
718
- state.tokenize = function(stream2, state2) {
719
- var e = false, c, i = 0;
720
- while (c = stream2.next()) {
721
- if (c === chain[i] && !e) {
722
- if (chain[++i] !== void 0) {
723
- state2.chain = chain[i];
724
- state2.style = style;
725
- state2.tail = tail;
726
- } else if (tail)
727
- stream2.eatWhile(tail);
728
- state2.tokenize = tokenPerl;
729
- return style;
730
- }
731
- e = !e && c == "\\";
732
- }
733
- return style;
734
- };
735
- return state.tokenize(stream, state);
736
- }
737
- function tokenSOMETHING(stream, state, string) {
738
- state.tokenize = function(stream2, state2) {
739
- if (stream2.string == string)
740
- state2.tokenize = tokenPerl;
741
- stream2.skipToEnd();
742
- return "string";
743
- };
744
- return state.tokenize(stream, state);
745
- }
746
- function tokenPerl(stream, state) {
747
- if (stream.eatSpace())
748
- return null;
749
- if (state.chain)
750
- return tokenChain(stream, state, state.chain, state.style, state.tail);
751
- if (stream.match(/^(\-?((\d[\d_]*)?\.\d+(e[+-]?\d+)?|\d+\.\d*)|0x[\da-fA-F_]+|0b[01_]+|\d[\d_]*(e[+-]?\d+)?)/))
752
- return "number";
753
- if (stream.match(/^<<(?=[_a-zA-Z])/)) {
754
- stream.eatWhile(/\w/);
755
- return tokenSOMETHING(stream, state, stream.current().substr(2));
756
- }
757
- if (stream.sol() && stream.match(/^\=item(?!\w)/)) {
758
- return tokenSOMETHING(stream, state, "=cut");
759
- }
760
- var ch = stream.next();
761
- if (ch == '"' || ch == "'") {
762
- if (prefix(stream, 3) == "<<" + ch) {
763
- var p = stream.pos;
764
- stream.eatWhile(/\w/);
765
- var n = stream.current().substr(1);
766
- if (n && stream.eat(ch))
767
- return tokenSOMETHING(stream, state, n);
768
- stream.pos = p;
769
- }
770
- return tokenChain(stream, state, [ch], "string");
771
- }
772
- if (ch == "q") {
773
- var c = look(stream, -2);
774
- if (!(c && /\w/.test(c))) {
775
- c = look(stream, 0);
776
- if (c == "x") {
777
- c = look(stream, 1);
778
- if (c == "(") {
779
- eatSuffix(stream, 2);
780
- return tokenChain(stream, state, [")"], RXstyle, RXmodifiers);
781
- }
782
- if (c == "[") {
783
- eatSuffix(stream, 2);
784
- return tokenChain(stream, state, ["]"], RXstyle, RXmodifiers);
785
- }
786
- if (c == "{") {
787
- eatSuffix(stream, 2);
788
- return tokenChain(stream, state, ["}"], RXstyle, RXmodifiers);
789
- }
790
- if (c == "<") {
791
- eatSuffix(stream, 2);
792
- return tokenChain(stream, state, [">"], RXstyle, RXmodifiers);
793
- }
794
- if (/[\^'"!~\/]/.test(c)) {
795
- eatSuffix(stream, 1);
796
- return tokenChain(stream, state, [stream.eat(c)], RXstyle, RXmodifiers);
797
- }
798
- } else if (c == "q") {
799
- c = look(stream, 1);
800
- if (c == "(") {
801
- eatSuffix(stream, 2);
802
- return tokenChain(stream, state, [")"], "string");
803
- }
804
- if (c == "[") {
805
- eatSuffix(stream, 2);
806
- return tokenChain(stream, state, ["]"], "string");
807
- }
808
- if (c == "{") {
809
- eatSuffix(stream, 2);
810
- return tokenChain(stream, state, ["}"], "string");
811
- }
812
- if (c == "<") {
813
- eatSuffix(stream, 2);
814
- return tokenChain(stream, state, [">"], "string");
815
- }
816
- if (/[\^'"!~\/]/.test(c)) {
817
- eatSuffix(stream, 1);
818
- return tokenChain(stream, state, [stream.eat(c)], "string");
819
- }
820
- } else if (c == "w") {
821
- c = look(stream, 1);
822
- if (c == "(") {
823
- eatSuffix(stream, 2);
824
- return tokenChain(stream, state, [")"], "bracket");
825
- }
826
- if (c == "[") {
827
- eatSuffix(stream, 2);
828
- return tokenChain(stream, state, ["]"], "bracket");
829
- }
830
- if (c == "{") {
831
- eatSuffix(stream, 2);
832
- return tokenChain(stream, state, ["}"], "bracket");
833
- }
834
- if (c == "<") {
835
- eatSuffix(stream, 2);
836
- return tokenChain(stream, state, [">"], "bracket");
837
- }
838
- if (/[\^'"!~\/]/.test(c)) {
839
- eatSuffix(stream, 1);
840
- return tokenChain(stream, state, [stream.eat(c)], "bracket");
841
- }
842
- } else if (c == "r") {
843
- c = look(stream, 1);
844
- if (c == "(") {
845
- eatSuffix(stream, 2);
846
- return tokenChain(stream, state, [")"], RXstyle, RXmodifiers);
847
- }
848
- if (c == "[") {
849
- eatSuffix(stream, 2);
850
- return tokenChain(stream, state, ["]"], RXstyle, RXmodifiers);
851
- }
852
- if (c == "{") {
853
- eatSuffix(stream, 2);
854
- return tokenChain(stream, state, ["}"], RXstyle, RXmodifiers);
855
- }
856
- if (c == "<") {
857
- eatSuffix(stream, 2);
858
- return tokenChain(stream, state, [">"], RXstyle, RXmodifiers);
859
- }
860
- if (/[\^'"!~\/]/.test(c)) {
861
- eatSuffix(stream, 1);
862
- return tokenChain(stream, state, [stream.eat(c)], RXstyle, RXmodifiers);
863
- }
864
- } else if (/[\^'"!~\/(\[{<]/.test(c)) {
865
- if (c == "(") {
866
- eatSuffix(stream, 1);
867
- return tokenChain(stream, state, [")"], "string");
868
- }
869
- if (c == "[") {
870
- eatSuffix(stream, 1);
871
- return tokenChain(stream, state, ["]"], "string");
872
- }
873
- if (c == "{") {
874
- eatSuffix(stream, 1);
875
- return tokenChain(stream, state, ["}"], "string");
876
- }
877
- if (c == "<") {
878
- eatSuffix(stream, 1);
879
- return tokenChain(stream, state, [">"], "string");
880
- }
881
- if (/[\^'"!~\/]/.test(c)) {
882
- return tokenChain(stream, state, [stream.eat(c)], "string");
883
- }
884
- }
885
- }
886
- }
887
- if (ch == "m") {
888
- var c = look(stream, -2);
889
- if (!(c && /\w/.test(c))) {
890
- c = stream.eat(/[(\[{<\^'"!~\/]/);
891
- if (c) {
892
- if (/[\^'"!~\/]/.test(c)) {
893
- return tokenChain(stream, state, [c], RXstyle, RXmodifiers);
894
- }
895
- if (c == "(") {
896
- return tokenChain(stream, state, [")"], RXstyle, RXmodifiers);
897
- }
898
- if (c == "[") {
899
- return tokenChain(stream, state, ["]"], RXstyle, RXmodifiers);
900
- }
901
- if (c == "{") {
902
- return tokenChain(stream, state, ["}"], RXstyle, RXmodifiers);
903
- }
904
- if (c == "<") {
905
- return tokenChain(stream, state, [">"], RXstyle, RXmodifiers);
906
- }
907
- }
908
- }
909
- }
910
- if (ch == "s") {
911
- var c = /[\/>\]})\w]/.test(look(stream, -2));
912
- if (!c) {
913
- c = stream.eat(/[(\[{<\^'"!~\/]/);
914
- if (c) {
915
- if (c == "[")
916
- return tokenChain(stream, state, ["]", "]"], RXstyle, RXmodifiers);
917
- if (c == "{")
918
- return tokenChain(stream, state, ["}", "}"], RXstyle, RXmodifiers);
919
- if (c == "<")
920
- return tokenChain(stream, state, [">", ">"], RXstyle, RXmodifiers);
921
- if (c == "(")
922
- return tokenChain(stream, state, [")", ")"], RXstyle, RXmodifiers);
923
- return tokenChain(stream, state, [c, c], RXstyle, RXmodifiers);
924
- }
925
- }
926
- }
927
- if (ch == "y") {
928
- var c = /[\/>\]})\w]/.test(look(stream, -2));
929
- if (!c) {
930
- c = stream.eat(/[(\[{<\^'"!~\/]/);
931
- if (c) {
932
- if (c == "[")
933
- return tokenChain(stream, state, ["]", "]"], RXstyle, RXmodifiers);
934
- if (c == "{")
935
- return tokenChain(stream, state, ["}", "}"], RXstyle, RXmodifiers);
936
- if (c == "<")
937
- return tokenChain(stream, state, [">", ">"], RXstyle, RXmodifiers);
938
- if (c == "(")
939
- return tokenChain(stream, state, [")", ")"], RXstyle, RXmodifiers);
940
- return tokenChain(stream, state, [c, c], RXstyle, RXmodifiers);
941
- }
942
- }
943
- }
944
- if (ch == "t") {
945
- var c = /[\/>\]})\w]/.test(look(stream, -2));
946
- if (!c) {
947
- c = stream.eat("r");
948
- if (c) {
949
- c = stream.eat(/[(\[{<\^'"!~\/]/);
950
- if (c) {
951
- if (c == "[")
952
- return tokenChain(stream, state, ["]", "]"], RXstyle, RXmodifiers);
953
- if (c == "{")
954
- return tokenChain(stream, state, ["}", "}"], RXstyle, RXmodifiers);
955
- if (c == "<")
956
- return tokenChain(stream, state, [">", ">"], RXstyle, RXmodifiers);
957
- if (c == "(")
958
- return tokenChain(stream, state, [")", ")"], RXstyle, RXmodifiers);
959
- return tokenChain(stream, state, [c, c], RXstyle, RXmodifiers);
960
- }
961
- }
962
- }
963
- }
964
- if (ch == "`") {
965
- return tokenChain(stream, state, [ch], "builtin");
966
- }
967
- if (ch == "/") {
968
- if (!/~\s*$/.test(prefix(stream)))
969
- return "operator";
970
- else
971
- return tokenChain(stream, state, [ch], RXstyle, RXmodifiers);
972
- }
973
- if (ch == "$") {
974
- var p = stream.pos;
975
- if (stream.eatWhile(/\d/) || stream.eat("{") && stream.eatWhile(/\d/) && stream.eat("}"))
976
- return "builtin";
977
- else
978
- stream.pos = p;
979
- }
980
- if (/[$@%]/.test(ch)) {
981
- var p = stream.pos;
982
- if (stream.eat("^") && stream.eat(/[A-Z]/) || !/[@$%&]/.test(look(stream, -2)) && stream.eat(/[=|\\\-#?@;:&`~\^!\[\]*'"$+.,\/<>()]/)) {
983
- var c = stream.current();
984
- if (PERL[c])
985
- return "builtin";
986
- }
987
- stream.pos = p;
988
- }
989
- if (/[$@%&]/.test(ch)) {
990
- if (stream.eatWhile(/[\w$]/) || stream.eat("{") && stream.eatWhile(/[\w$]/) && stream.eat("}")) {
991
- var c = stream.current();
992
- if (PERL[c])
993
- return "builtin";
994
- else
995
- return "variable";
996
- }
997
- }
998
- if (ch == "#") {
999
- if (look(stream, -2) != "$") {
1000
- stream.skipToEnd();
1001
- return "comment";
1002
- }
1003
- }
1004
- if (/[:+\-\^*$&%@=<>!?|\/~\.]/.test(ch)) {
1005
- var p = stream.pos;
1006
- stream.eatWhile(/[:+\-\^*$&%@=<>!?|\/~\.]/);
1007
- if (PERL[stream.current()])
1008
- return "operator";
1009
- else
1010
- stream.pos = p;
1011
- }
1012
- if (ch == "_") {
1013
- if (stream.pos == 1) {
1014
- if (suffix(stream, 6) == "_END__") {
1015
- return tokenChain(stream, state, ["\0"], "comment");
1016
- } else if (suffix(stream, 7) == "_DATA__") {
1017
- return tokenChain(stream, state, ["\0"], "builtin");
1018
- } else if (suffix(stream, 7) == "_C__") {
1019
- return tokenChain(stream, state, ["\0"], "string");
1020
- }
1021
- }
1022
- }
1023
- if (/\w/.test(ch)) {
1024
- var p = stream.pos;
1025
- if (look(stream, -2) == "{" && (look(stream, 0) == "}" || stream.eatWhile(/\w/) && look(stream, 0) == "}"))
1026
- return "string";
1027
- else
1028
- stream.pos = p;
1029
- }
1030
- if (/[A-Z]/.test(ch)) {
1031
- var l = look(stream, -2);
1032
- var p = stream.pos;
1033
- stream.eatWhile(/[A-Z_]/);
1034
- if (/[\da-z]/.test(look(stream, 0))) {
1035
- stream.pos = p;
1036
- } else {
1037
- var c = PERL[stream.current()];
1038
- if (!c)
1039
- return "meta";
1040
- if (c[1])
1041
- c = c[0];
1042
- if (l != ":") {
1043
- if (c == 1)
1044
- return "keyword";
1045
- else if (c == 2)
1046
- return "def";
1047
- else if (c == 3)
1048
- return "atom";
1049
- else if (c == 4)
1050
- return "operator";
1051
- else if (c == 5)
1052
- return "builtin";
1053
- else
1054
- return "meta";
1055
- } else
1056
- return "meta";
1057
- }
1058
- }
1059
- if (/[a-zA-Z_]/.test(ch)) {
1060
- var l = look(stream, -2);
1061
- stream.eatWhile(/\w/);
1062
- var c = PERL[stream.current()];
1063
- if (!c)
1064
- return "meta";
1065
- if (c[1])
1066
- c = c[0];
1067
- if (l != ":") {
1068
- if (c == 1)
1069
- return "keyword";
1070
- else if (c == 2)
1071
- return "def";
1072
- else if (c == 3)
1073
- return "atom";
1074
- else if (c == 4)
1075
- return "operator";
1076
- else if (c == 5)
1077
- return "builtin";
1078
- else
1079
- return "meta";
1080
- } else
1081
- return "meta";
1082
- }
1083
- return null;
1084
- }
1085
- const perl = {
1086
- name: "perl",
1087
- startState: function() {
1088
- return {
1089
- tokenize: tokenPerl,
1090
- chain: null,
1091
- style: null,
1092
- tail: null
1093
- };
1094
- },
1095
- token: function(stream, state) {
1096
- return (state.tokenize || tokenPerl)(stream, state);
1097
- },
1098
- languageData: {
1099
- commentTokens: { line: "#" },
1100
- wordChars: "$"
1101
- }
1102
- };
1103
- export {
1104
- perl
1105
- };
1106
- //# sourceMappingURL=perl-DL9mHpoi.js.map