PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.13.0
Code Block Pro – Beautiful Syntax Highlighting v1.13.0
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / gnuplot.tmLanguage.json

gnuplot.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.13.0, at build/shiki/languages/gnuplot.tmLanguage.json

888 lines 29.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "name": "gnuplot",
3 "scopeName": "source.gnuplot",
4 "uuid": "A75AB1C2-611C-4500-9EE4-20668B5BB465",
5 "fileTypes": ["gp", "plt", "plot", "gnuplot"],
6 "patterns": [
7 {
8 "name": "invalid.illegal.backslash.gnuplot",
9 "match": "(\\\\(?!\\n).*)"
10 },
11 {
12 "name": "punctuation.separator.statement.gnuplot",
13 "match": "(;)"
14 },
15 {
16 "include": "#LineComment"
17 },
18 {
19 "include": "#DataBlock"
20 },
21 {
22 "include": "#MacroExpansion"
23 },
24 {
25 "include": "#VariableDecl"
26 },
27 {
28 "include": "#ArrayDecl"
29 },
30 {
31 "include": "#FunctionDecl"
32 },
33 {
34 "include": "#ShellCommand"
35 },
36 {
37 "include": "#Command"
38 }
39 ],
40 "repository": {
41 "DataBlock": {
42 "name": "meta.datablock.gnuplot",
43 "begin": "(?x:\n\t\t\t\t([$][A-Za-z_]\\w*)\\s* # 1: var name\n\t\t\t\t(<<)\\s* # 2: shift operator\n\t\t\t\t([A-Za-z_]\\w*)\\s* # 3: end tag\n\t\t\t\t(?=(\\#|$)) # 4: comment or end of line\n\t\t\t)",
44 "beginCaptures": {
45 "1": {
46 "patterns": [
47 {
48 "include": "#SpecialVariable"
49 }
50 ]
51 },
52 "3": {
53 "name": "constant.language.datablock.gnuplot"
54 }
55 },
56 "end": "^(\\3)\\b(.*)",
57 "endCaptures": {
58 "1": {
59 "name": "constant.language.datablock.gnuplot"
60 },
61 "2": {
62 "name": "invalid.illegal.datablock.gnuplot"
63 }
64 },
65 "patterns": [
66 {
67 "include": "#LineComment"
68 },
69 {
70 "include": "#NumberLiteral"
71 },
72 {
73 "include": "#DoubleQuotedStringLiteral"
74 }
75 ]
76 },
77 "MacroExpansion": {
78 "begin": "([@][A-Za-z_]\\w*)",
79 "beginCaptures": {
80 "1": {
81 "patterns": [
82 {
83 "include": "#SpecialVariable"
84 }
85 ]
86 }
87 },
88 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
89 "patterns": [
90 {
91 "include": "#Expression"
92 }
93 ]
94 },
95 "VariableDecl": {
96 "name": "meta.variable.gnuplot",
97 "begin": "\\b(?x:\n\t\t\t\t([A-Za-z_]\\w*)\\s* # 1: var name\n\t\t\t\t(?:\n\t\t\t\t\t(\\[)\\s* # 2: opening bracket\n\t\t\t\t\t(.*)\\s* # 3: expression\n\t\t\t\t\t(\\])\\s* # 4: closing bracket\n\t\t\t\t)?\n\t\t\t\t(?=(=)(?!\\s*=)) # 5: assignment\n\t\t\t)",
98 "beginCaptures": {
99 "1": {
100 "name": "entity.name.variable.gnuplot",
101 "patterns": [
102 {
103 "include": "#InvalidVariableDecl"
104 },
105 {
106 "include": "#BuiltinVariable"
107 }
108 ]
109 },
110 "3": {
111 "patterns": [
112 {
113 "include": "#Expression"
114 }
115 ]
116 }
117 },
118 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
119 "patterns": [
120 {
121 "include": "#Expression"
122 }
123 ]
124 },
125 "ArrayDecl": {
126 "name": "meta.variable.gnuplot",
127 "begin": "\\b(?x:\n\t\t\t\t(array)\\s+ # 1: array keyword\n\t\t\t\t([A-Za-z_]\\w*)? # 2: var name\n\t\t\t\t# Note: Handle size decl and init expression inside.\n\t\t\t\t# TODO: Properly annotate brackets.\n\t\t\t)",
128 "beginCaptures": {
129 "1": {
130 "name": "support.type.array.gnuplot"
131 },
132 "2": {
133 "name": "entity.name.variable.gnuplot",
134 "patterns": [
135 {
136 "include": "#InvalidVariableDecl"
137 },
138 {
139 "include": "#BuiltinVariable"
140 }
141 ]
142 }
143 },
144 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
145 "patterns": [
146 {
147 "include": "#Expression"
148 }
149 ]
150 },
151 "FunctionDecl": {
152 "name": "meta.function.gnuplot",
153 "begin": "\\b(?x:\n\t\t\t\t([A-Za-z_]\\w*)\\s* # 1: func name\n\t\t\t\t( # 2: parameter list\n\t\t\t\t\t(\\()\\s* # 3: opening parens\n\t\t\t\t\t([A-Za-z_]\\w*)\\s* # 4: arg name\n\t\t\t\t\t(?:\n\t\t\t\t\t\t(,)\\s* # 5: comma\n\t\t\t\t\t\t([A-Za-z_]\\w*)\\s* # 6: other args\n\t\t\t\t\t)*\n\t\t\t\t\t(\\)) # 7: closing parens\n\t\t\t\t)\n\t\t\t)",
154 "beginCaptures": {
155 "1": {
156 "name": "entity.name.function.gnuplot",
157 "patterns": [
158 {
159 "include": "#BuiltinFunction"
160 }
161 ]
162 },
163 "2": {
164 "name": "meta.function.parameters.gnuplot"
165 },
166 "3": {
167 "name": "punctuation.definition.parameters.begin.gnuplot"
168 },
169 "4": {
170 "name": "variable.parameter.function.language.gnuplot"
171 },
172 "5": {
173 "name": "punctuation.separator.parameters.gnuplot"
174 },
175 "6": {
176 "name": "variable.parameter.function.language.gnuplot"
177 },
178 "7": {
179 "name": "punctuation.definition.parameters.end.gnuplot"
180 }
181 },
182 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
183 "patterns": [
184 {
185 "include": "#Expression"
186 }
187 ]
188 },
189 "InvalidVariableDecl": {
190 "name": "invalid.illegal.variable.gnuplot",
191 "match": "\\b(GPVAL_\\w*|MOUSE_\\w*)\\b"
192 },
193 "ShellCommand": {
194 "begin": "(!)",
195 "beginCaptures": {
196 "1": {
197 "name": "keyword.other.shell.gnuplot"
198 }
199 },
200 "end": "(?=(#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
201 "patterns": [
202 {
203 "name": "string.unquoted",
204 "match": "([^#]|\\\\(?=\\n))"
205 }
206 ]
207 },
208 "Command": {
209 "patterns": [
210 {
211 "name": "invalid.deprecated.command.gnuplot",
212 "begin": "\\b(?x:\n\t\t\t\t\t\tupdate\n\t\t\t\t\t)\\b",
213 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))"
214 },
215 {
216 "begin": "\\b(?x:\n\t\t\t\t\t\tbreak |\n\t\t\t\t\t\tclear |\n\t\t\t\t\t\tcontinue |\n\t\t\t\t\t\tpwd |\n\t\t\t\t\t\trefresh |\n\t\t\t\t\t\treplot |\n\t\t\t\t\t\treread |\n\t\t\t\t\t\tshell\n\t\t\t\t\t)\\b",
217 "beginCaptures": {
218 "0": {
219 "name": "keyword.other.command.gnuplot"
220 }
221 },
222 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
223 "patterns": [
224 {
225 "include": "#InvalidWord"
226 }
227 ]
228 },
229 {
230 "begin": "\\b(?x:\n\t\t\t\t\t\tcd |\n\t\t\t\t\t\tcall |\n\t\t\t\t\t\teval |\n\t\t\t\t\t\texit |\n\t\t\t\t\t\thelp |\n\t\t\t\t\t\thistory |\n\t\t\t\t\t\tload |\n\t\t\t\t\t\tlower |\n\t\t\t\t\t\tpause |\n\t\t\t\t\t\tprint |\n\t\t\t\t\t\tprinterr |\n\t\t\t\t\t\tquit |\n\t\t\t\t\t\traise |\n\t\t\t\t\t\tsave |\n\t\t\t\t\t\tstats |\n\t\t\t\t\t\tsystem |\n\t\t\t\t\t\ttest |\n\t\t\t\t\t\ttoggle\n\t\t\t\t\t)\\b",
231 "beginCaptures": {
232 "0": {
233 "name": "keyword.other.command.gnuplot"
234 }
235 },
236 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
237 "patterns": [
238 {
239 "include": "#Expression"
240 }
241 ]
242 },
243 {
244 "begin": "\\b(import)\\s(.+)\\s(from)",
245 "beginCaptures": {
246 "1": {
247 "name": "keyword.control.import.gnuplot"
248 },
249 "2": {
250 "patterns": [
251 {
252 "include": "#FunctionDecl"
253 }
254 ]
255 },
256 "3": {
257 "name": "keyword.control.import.gnuplot"
258 }
259 },
260 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
261 "patterns": [
262 {
263 "include": "#SingleQuotedStringLiteral"
264 },
265 {
266 "include": "#DoubleQuotedStringLiteral"
267 },
268 {
269 "include": "#InvalidWord"
270 }
271 ]
272 },
273 {
274 "begin": "\\b(reset)\\b",
275 "beginCaptures": {
276 "1": {
277 "name": "keyword.other.command.gnuplot"
278 }
279 },
280 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
281 "patterns": [
282 {
283 "name": "support.class.reset.gnuplot",
284 "match": "\\b(bind|error(state)?|session)\\b"
285 },
286 {
287 "include": "#InvalidWord"
288 }
289 ]
290 },
291 {
292 "begin": "\\b(undefine)\\b",
293 "beginCaptures": {
294 "1": {
295 "name": "keyword.other.command.gnuplot"
296 }
297 },
298 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
299 "patterns": [
300 {
301 "include": "#BuiltinVariable"
302 },
303 {
304 "include": "#BuiltinFunction"
305 },
306 {
307 "name": "source.gnuplot",
308 "match": "(?<=\\s)([$]?[A-Za-z_]\\w*\\*?)(?=\\s)"
309 },
310 {
311 "include": "#InvalidWord"
312 }
313 ]
314 },
315 {
316 "begin": "\\b(if|while)\\b",
317 "beginCaptures": {
318 "1": {
319 "name": "keyword.control.conditional.gnuplot"
320 }
321 },
322 "end": "(?=(\\{|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
323 "patterns": [
324 {
325 "include": "#Expression"
326 }
327 ]
328 },
329 {
330 "begin": "\\b(else)\\b",
331 "beginCaptures": {
332 "1": {
333 "name": "keyword.control.conditional.gnuplot"
334 }
335 },
336 "end": "(?=(\\{|#|\\\\(?!\\n)|(?<!\\\\)\\n$))"
337 },
338 {
339 "begin": "\\b(do)\\b",
340 "beginCaptures": {
341 "1": {
342 "name": "keyword.control.flow.gnuplot"
343 }
344 },
345 "end": "(?=(\\{|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
346 "patterns": [
347 {
348 "include": "#ForIterationExpr"
349 }
350 ]
351 },
352 {
353 "begin": "\\b(set)(?=\\s+pm3d)\\b",
354 "beginCaptures": {
355 "1": {
356 "name": "keyword.other.command.gnuplot"
357 }
358 },
359 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
360 "patterns": [
361 {
362 "name": "invalid.deprecated.options.gnuplot",
363 "match": "\\b(hidden3d|map|transparent|solid)\\b"
364 },
365 {
366 "include": "#SetUnsetOptions"
367 },
368 {
369 "include": "#ForIterationExpr"
370 },
371 {
372 "include": "#Expression"
373 }
374 ]
375 },
376 {
377 "begin": "\\b((un)?set)\\b",
378 "beginCaptures": {
379 "1": {
380 "name": "keyword.other.command.gnuplot"
381 }
382 },
383 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
384 "patterns": [
385 {
386 "include": "#SetUnsetOptions"
387 },
388 {
389 "include": "#ForIterationExpr"
390 },
391 {
392 "include": "#Expression"
393 }
394 ]
395 },
396 {
397 "begin": "\\b(show)\\b",
398 "beginCaptures": {
399 "1": {
400 "name": "keyword.other.command.gnuplot"
401 }
402 },
403 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
404 "patterns": [
405 {
406 "include": "#ExtraShowOptions"
407 },
408 {
409 "include": "#SetUnsetOptions"
410 },
411 {
412 "include": "#Expression"
413 }
414 ]
415 },
416 {
417 "begin": "\\b(fit|(s)?plot)\\b",
418 "beginCaptures": {
419 "1": {
420 "name": "keyword.other.command.gnuplot"
421 }
422 },
423 "end": "(?=(;|#|\\\\(?!\\n)|(?<!\\\\)\\n$))",
424 "patterns": [
425 {
426 "include": "#ColumnIndexLiteral"
427 },
428 {
429 "include": "#PlotModifiers"
430 },
431 {
432 "include": "#ForIterationExpr"
433 },
434 {
435 "include": "#Expression"
436 }
437 ]
438 }
439 ]
440 },
441 "SetUnsetOptions": {
442 "patterns": [
443 {
444 "name": "invalid.deprecated.options.gnuplot",
445 "match": "\\G\\s*\\b(?x:\n\t\t\t\t\t\tclabel |\n\t\t\t\t\t\tdata |\n\t\t\t\t\t\tfunction |\n\t\t\t\t\t\thistorysize |\n\t\t\t\t\t\tmacros |\n\t\t\t\t\t\tticslevel |\n\t\t\t\t\t\tticscale |\n\t\t\t\t\t\t(style\\s+increment\\s+\\w+)\n\t\t\t\t\t)\\b"
446 },
447 {
448 "name": "support.class.options.gnuplot",
449 "match": "\\G\\s*\\b(?x:\n\t\t\t\t\t\tangles |\n\t\t\t\t\t\tarrow |\n\t\t\t\t\t\tautoscale |\n\t\t\t\t\t\tborder |\n\t\t\t\t\t\tboxwidth |\n\t\t\t\t\t\tclip |\n\t\t\t\t\t\tcntr(label|param) |\n\t\t\t\t\t\tcolor(box|sequence)?|\n\t\t\t\t\t\tcontour |\n\t\t\t\t\t\t(dash|line)type |\n\t\t\t\t\t\tdatafile |\n\t\t\t\t\t\tdecimal(sign)? |\n\t\t\t\t\t\tdgrid3d |\n\t\t\t\t\t\tdummy |\n\t\t\t\t\t\tencoding |\n\t\t\t\t\t\t(error)?bars |\n\t\t\t\t\t\tfit |\n\t\t\t\t\t\tfontpath |\n\t\t\t\t\t\tformat |\n\t\t\t\t\t\tgrid |\n\t\t\t\t\t\thidden3d |\n\t\t\t\t\t\thistory |\n\t\t\t\t\t\t(iso)?samples |\n\t\t\t\t\t\tjitter |\n\t\t\t\t\t\tkey |\n\t\t\t\t\t\tlabel |\n\t\t\t\t\t\tlink |\n\t\t\t\t\t\tloadpath |\n\t\t\t\t\t\tlocale |\n\t\t\t\t\t\tlogscale |\n\t\t\t\t\t\tmapping |\n\t\t\t\t\t\t[lrtb]margin |\n\t\t\t\t\t\tmargins |\n\t\t\t\t\t\tmicro |\n\t\t\t\t\t\tminus(sign)? |\n\t\t\t\t\t\tmono(chrome)? |\n\t\t\t\t\t\tmouse |\n\t\t\t\t\t\tmultiplot |\n\t\t\t\t\t\tnonlinear |\n\t\t\t\t\t\tobject |\n\t\t\t\t\t\toffsets |\n\t\t\t\t\t\torigin |\n\t\t\t\t\t\toutput |\n\t\t\t\t\t\tparametric |\n\t\t\t\t\t\t(p|r)axis |\n\t\t\t\t\t\tpm3d |\n\t\t\t\t\t\tpalette |\n\t\t\t\t\t\tpointintervalbox |\n\t\t\t\t\t\tpointsize |\n\t\t\t\t\t\tpolar |\n\t\t\t\t\t\tprint |\n\t\t\t\t\t\tpsdir |\n\t\t\t\t\t\tsize |\n\t\t\t\t\t\tstyle |\n\t\t\t\t\t\tsurface |\n\t\t\t\t\t\ttable |\n\t\t\t\t\t\tterminal |\n\t\t\t\t\t\ttermoption |\n\t\t\t\t\t\ttheta |\n\t\t\t\t\t\ttics |\n\t\t\t\t\t\ttimestamp |\n\t\t\t\t\t\ttimefmt |\n\t\t\t\t\t\ttitle |\n\t\t\t\t\t\tview |\n\t\t\t\t\t\txyplane |\n\t\t\t\t\t\tzero |\n\t\t\t\t\t\t(no)?(m)?(x|x2|y|y2|z|cb|r|t)tics |\n\t\t\t\t\t\t(x|x2|y|y2|z|cb)data |\n\t\t\t\t\t\t(x|x2|y|y2|z|cb|r)label |\n\t\t\t\t\t\t(x|x2|y|y2|z|cb)dtics |\n\t\t\t\t\t\t(x|x2|y|y2|z|cb)mtics |\n\t\t\t\t\t\t(x|x2|y|y2|z|cb|[rtuv])range |\n\t\t\t\t\t\t(x|x2|y|y2|z)?zeroaxis\n\t\t\t\t\t)\\b"
450 }
451 ]
452 },
453 "ExtraShowOptions": {
454 "name": "support.class.options.gnuplot",
455 "match": "\\b(?x:\n\t\t\t\tall |\n\t\t\t\tbind |\n\t\t\t\tcolornames |\n\t\t\t\tfunctions |\n\t\t\t\tplot |\n\t\t\t\tvariables |\n\t\t\t\tversion\n\t\t\t)\\b"
456 },
457 "PlotModifiers": {
458 "patterns": [
459 {
460 "name": "invalid.deprecated.plot.gnuplot",
461 "match": "\\b(thru)\\b"
462 },
463 {
464 "name": "storage.type.plot.gnuplot",
465 "match": "\\b(?x:\n\t\t\t\t\t\tin(dex)? |\n\t\t\t\t\t\tevery |\n\t\t\t\t\t\tus(ing)? |\n\t\t\t\t\t\twi(th)? |\n\t\t\t\t\t\tvia\n\t\t\t\t\t)\\b"
466 },
467 {
468 "name": "storage.type.plot.gnuplot",
469 "match": "\\b(newhist(ogram)?)\\b"
470 }
471 ]
472 },
473 "InvalidWord": {
474 "name": "invalid.illegal.gnuplot",
475 "match": "([^;#\\\\[:space:]]+)"
476 },
477 "Expression": {
478 "patterns": [
479 {
480 "include": "#Literal"
481 },
482 {
483 "include": "#SpecialVariable"
484 },
485 {
486 "include": "#BuiltinVariable"
487 },
488 {
489 "include": "#BuiltinOperator"
490 },
491 {
492 "include": "#TernaryExpr"
493 },
494 {
495 "include": "#FunctionCallExpr"
496 },
497 {
498 "include": "#SummationExpr"
499 }
500 ]
501 },
502 "ForIterationExpr": {
503 "begin": "\\b(?x:\n\t\t\t\t(for)\\s* # 1: for keyword\n\t\t\t\t(\\[)\\s* # 2: opening bracket\n\t\t\t\t(?: # optionally\n\t\t\t\t\t([A-Za-z_]\\w*)\\s+ # 3: var name\n\t\t\t\t\t(in)\\b # 4: in keyword\n\t\t\t\t)?\n\t\t\t)",
504 "beginCaptures": {
505 "1": {
506 "name": "keyword.control.flow.gnuplot"
507 },
508 "2": {
509 "patterns": [
510 {
511 "include": "#RangeSeparators"
512 }
513 ]
514 },
515 "3": {
516 "name": "variable.other.iterator.gnuplot"
517 },
518 "4": {
519 "name": "keyword.control.flow.gnuplot"
520 }
521 },
522 "end": "((\\])|(?=(#|\\\\(?!\\n)|(?<!\\\\)\\n$)))",
523 "endCaptures": {
524 "2": {
525 "patterns": [
526 {
527 "include": "#RangeSeparators"
528 }
529 ]
530 }
531 },
532 "patterns": [
533 {
534 "include": "#Expression"
535 },
536 {
537 "include": "#RangeSeparators"
538 }
539 ]
540 },
541 "SummationExpr": {
542 "begin": "\\b(sum)\\s*(\\[)",
543 "beginCaptures": {
544 "1": {
545 "name": "keyword.other.sum.gnuplot"
546 },
547 "2": {
548 "patterns": [
549 {
550 "include": "#RangeSeparators"
551 }
552 ]
553 }
554 },
555 "end": "((\\])|(?=(#|\\\\(?!\\n)|(?<!\\\\)\\n$)))",
556 "endCaptures": {
557 "2": {
558 "patterns": [
559 {
560 "include": "#RangeSeparators"
561 }
562 ]
563 }
564 },
565 "patterns": [
566 {
567 "include": "#Expression"
568 },
569 {
570 "include": "#RangeSeparators"
571 }
572 ]
573 },
574 "FunctionCallExpr": {
575 "name": "meta.function-call.gnuplot",
576 "begin": "\\b([A-Za-z_]\\w*)\\s*(\\()",
577 "beginCaptures": {
578 "1": {
579 "name": "variable.function.gnuplot",
580 "patterns": [
581 {
582 "include": "#BuiltinFunction"
583 }
584 ]
585 },
586 "2": {
587 "name": "punctuation.definition.arguments.begin.gnuplot"
588 }
589 },
590 "end": "((\\))|(?=(#|\\\\(?!\\n)|(?<!\\\\)\\n$)))",
591 "endCaptures": {
592 "2": {
593 "name": "punctuation.definition.arguments.end.gnuplot"
594 }
595 },
596 "patterns": [
597 {
598 "include": "#Expression"
599 }
600 ]
601 },
602 "TernaryExpr": {
603 "begin": "(?<!\\?)(\\?)(?!\\?)",
604 "beginCaptures": {
605 "1": {
606 "name": "keyword.operator.ternary.gnuplot"
607 }
608 },
609 "end": "((?<!:)(:)(?!:)|(?=(#|\\\\(?!\\n)|(?<!\\\\)\\n$)))",
610 "endCaptures": {
611 "2": {
612 "name": "keyword.operator.ternary.gnuplot"
613 }
614 },
615 "patterns": [
616 {
617 "include": "#Expression"
618 }
619 ]
620 },
621 "RangeSeparators": {
622 "patterns": [
623 {
624 "name": "punctuation.section.brackets.begin.gnuplot",
625 "match": "(\\[)"
626 },
627 {
628 "name": "punctuation.separator.range.gnuplot",
629 "match": "(:)"
630 },
631 {
632 "name": "punctuation.section.brackets.end.gnuplot",
633 "match": "(\\])"
634 }
635 ]
636 },
637 "BuiltinOperator": {
638 "patterns": [
639 {
640 "name": "keyword.operator.logical.gnuplot",
641 "match": "(&&|\\|\\|)"
642 },
643 {
644 "name": "keyword.operator.bitwise.gnuplot",
645 "match": "(<<|>>|&|\\||\\^)"
646 },
647 {
648 "name": "keyword.operator.comparison.gnuplot",
649 "match": "(==|!=|<=|<|>=|>)"
650 },
651 {
652 "name": "keyword.operator.assignment.gnuplot",
653 "match": "(=)"
654 },
655 {
656 "name": "keyword.operator.arithmetic.gnuplot",
657 "match": "(\\+|-|~|!)"
658 },
659 {
660 "name": "keyword.operator.arithmetic.gnuplot",
661 "match": "(\\*\\*|\\+|-|\\*|/|%)"
662 },
663 {
664 "name": "keyword.operator.strings.gnuplot",
665 "match": "(\\.|\\b(eq|ne)\\b)",
666 "captures": {
667 "2": {
668 "name": "keyword.operator.word.gnuplot"
669 }
670 }
671 }
672 ]
673 },
674 "BuiltinVariable": {
675 "patterns": [
676 {
677 "name": "invalid.deprecated.variable.gnuplot",
678 "match": "\\b(?x:\n\t\t\t\t\t\tFIT_LIMIT |\n\t\t\t\t\t\tFIT_MAXITER |\n\t\t\t\t\t\tFIT_START_LAMBDA |\n\t\t\t\t\t\tFIT_LAMBDA_FACTOR |\n\t\t\t\t\t\tFIT_SKIP |\n\t\t\t\t\t\tFIT_INDEX\n\t\t\t\t\t)\\b"
679 },
680 {
681 "name": "support.constant.gnuplot",
682 "match": "\\b(GPVAL_\\w*|MOUSE_\\w*)\\b"
683 },
684 {
685 "name": "support.variable.gnuplot",
686 "match": "\\b(ARG[0-9C]|GPFUN_\\w*|FIT_\\w*|STATS_\\w*|pi|NaN)\\b"
687 }
688 ]
689 },
690 "SpecialVariable": {
691 "patterns": [
692 {
693 "match": "(?<=[\\[:=])\\s*(\\*)\\s*(?=[:\\]])",
694 "captures": {
695 "1": {
696 "name": "constant.language.wildcard.gnuplot"
697 }
698 }
699 },
700 {
701 "name": "constant.language.special.gnuplot",
702 "match": "(([@$])[A-Za-z_]\\w*)\\b",
703 "captures": {
704 "2": {
705 "name": "punctuation.definition.variable.gnuplot"
706 }
707 }
708 }
709 ]
710 },
711 "BuiltinFunction": {
712 "patterns": [
713 {
714 "name": "invalid.deprecated.function.gnuplot",
715 "match": "\\b(?x:\n\t\t\t\t\t\tdefined\n\t\t\t\t\t)\\b"
716 },
717 {
718 "name": "support.function.math.gnuplot",
719 "match": "\\b(?x:\n\t\t\t\t\t\tabs |\n\t\t\t\t\t\tacos |\n\t\t\t\t\t\tacosh |\n\t\t\t\t\t\tairy |\n\t\t\t\t\t\targ |\n\t\t\t\t\t\tasin |\n\t\t\t\t\t\tasinh |\n\t\t\t\t\t\tatan |\n\t\t\t\t\t\tatan2 |\n\t\t\t\t\t\tatanh |\n\t\t\t\t\t\tEllipticK |\n\t\t\t\t\t\tEllipticE |\n\t\t\t\t\t\tEllipticPi |\n\t\t\t\t\t\tbesj0 |\n\t\t\t\t\t\tbesj1 |\n\t\t\t\t\t\tbesy0 |\n\t\t\t\t\t\tbesy1 |\n\t\t\t\t\t\tceil |\n\t\t\t\t\t\tcos |\n\t\t\t\t\t\tcosh |\n\t\t\t\t\t\terf |\n\t\t\t\t\t\terfc |\n\t\t\t\t\t\texp |\n\t\t\t\t\t\texpint |\n\t\t\t\t\t\tfloor |\n\t\t\t\t\t\tgamma |\n\t\t\t\t\t\tibeta |\n\t\t\t\t\t\tinverf |\n\t\t\t\t\t\tigamma |\n\t\t\t\t\t\timag |\n\t\t\t\t\t\tinvnorm |\n\t\t\t\t\t\tint |\n\t\t\t\t\t\tlambertw |\n\t\t\t\t\t\tlgamma |\n\t\t\t\t\t\tlog |\n\t\t\t\t\t\tlog10 |\n\t\t\t\t\t\tnorm |\n\t\t\t\t\t\trand |\n\t\t\t\t\t\treal |\n\t\t\t\t\t\tsgn |\n\t\t\t\t\t\tsin |\n\t\t\t\t\t\tsinh |\n\t\t\t\t\t\tsqrt |\n\t\t\t\t\t\ttan |\n\t\t\t\t\t\ttanh |\n\t\t\t\t\t\tvoigt |\n\t\t\t\t\t\tcerf |\n\t\t\t\t\t\tcdawson |\n\t\t\t\t\t\tfaddeeva |\n\t\t\t\t\t\terfi |\n\t\t\t\t\t\tVP\n\t\t\t\t\t)\\b"
720 },
721 {
722 "name": "support.function.string.gnuplot",
723 "match": "\\b(?x:\n\t\t\t\t\t\tgprintf |\n\t\t\t\t\t\tsprintf |\n\t\t\t\t\t\tstrlen |\n\t\t\t\t\t\tstrstrt |\n\t\t\t\t\t\tsubstr |\n\t\t\t\t\t\tstrftime |\n\t\t\t\t\t\tstrptime |\n\t\t\t\t\t\tsystem |\n\t\t\t\t\t\tword |\n\t\t\t\t\t\twords\n\t\t\t\t\t)\\b"
724 },
725 {
726 "name": "support.function.other.gnuplot",
727 "match": "\\b(?x:\n\t\t\t\t\t\tcolumn |\n\t\t\t\t\t\tcolumnhead |\n\t\t\t\t\t\texists |\n\t\t\t\t\t\thsv2rgb |\n\t\t\t\t\t\tstringcolumn |\n\t\t\t\t\t\ttimecolumn |\n\t\t\t\t\t\ttm_hour |\n\t\t\t\t\t\ttm_mday |\n\t\t\t\t\t\ttm_min |\n\t\t\t\t\t\ttm_mon |\n\t\t\t\t\t\ttm_sec |\n\t\t\t\t\t\ttm_wday |\n\t\t\t\t\t\ttm_yday |\n\t\t\t\t\t\ttm_year |\n\t\t\t\t\t\ttime |\n\t\t\t\t\t\tvalid |\n\t\t\t\t\t\tvalue\n\t\t\t\t\t)\\b"
728 }
729 ]
730 },
731 "Literal": {
732 "patterns": [
733 {
734 "include": "#NumberLiteral"
735 },
736 {
737 "include": "#DeprecatedScriptArgsLiteral"
738 },
739 {
740 "include": "#SingleQuotedStringLiteral"
741 },
742 {
743 "include": "#DoubleQuotedStringLiteral"
744 },
745 {
746 "include": "#InterpolatedStringLiteral"
747 }
748 ]
749 },
750 "NumberLiteral": {
751 "patterns": [
752 {
753 "name": "constant.numeric.float.gnuplot",
754 "match": "(?x:\n\t\t\t\t\t\t# .5e2 and 0.5e2\n\t\t\t\t\t\t( ((\\b[0-9]+)|(?<!\\d)) ) # number or not a preceding digit\n\t\t\t\t\t\t( [.][0-9]+ ) # non-optional fractional\n\t\t\t\t\t\t( [Ee][+-]?[0-9]+ )? # optional exponent\n\t\t\t\t\t)(cm|in)?\\b"
755 },
756 {
757 "name": "constant.numeric.float.gnuplot",
758 "match": "(?x:\n\t\t\t\t\t\t# 5e2 and 5.e2\n\t\t\t\t\t\t( \\b[0-9]+ ) # non-optional number\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t( ( [Ee][+-]?[0-9]+\\b ) ) | # non-optional exponent\n\t\t\t\t\t\t\t( [.] ( [Ee][+-]?[0-9]+\\b )? ) # point and optional exponent\n\t\t\t\t\t\t)\n\t\t\t\t\t)(cm\\b|in\\b)?"
759 },
760 {
761 "name": "constant.numeric.hex.gnuplot",
762 "match": "\\b(0[Xx][0-9a-fA-F]+)(cm|in)?\\b"
763 },
764 {
765 "name": "constant.numeric.dec.gnuplot",
766 "match": "\\b(0+)(cm|in)?\\b"
767 },
768 {
769 "name": "constant.numeric.oct.gnuplot",
770 "match": "\\b(0[0-7]+)(cm|in)?\\b"
771 },
772 {
773 "name": "invalid.illegal.oct.gnuplot",
774 "match": "\\b(0[0-9]+)(cm|in)?\\b"
775 },
776 {
777 "name": "constant.numeric.dec.gnuplot",
778 "match": "\\b([0-9]+)(cm|in)?\\b"
779 }
780 ]
781 },
782 "ColumnIndexLiteral": {
783 "name": "support.constant.columnindex.gnuplot",
784 "match": "([$][0-9]+)\\b"
785 },
786 "DeprecatedScriptArgsLiteral": {
787 "name": "invalid.illegal.scriptargs.gnuplot",
788 "match": "([$][0-9#])"
789 },
790 "SingleQuotedStringLiteral": {
791 "name": "string.quoted.single.gnuplot",
792 "begin": "(')",
793 "beginCaptures": {
794 "1": {
795 "name": "punctuation.definition.string.begin.gnuplot"
796 }
797 },
798 "end": "((')(?!')|(?=(?<!\\\\)\\n$))",
799 "endCaptures": {
800 "0": {
801 "name": "punctuation.definition.string.end.gnuplot"
802 }
803 },
804 "patterns": [
805 {
806 "include": "#RGBColorSpec"
807 },
808 {
809 "name": "constant.character.escape.gnuplot",
810 "match": "('')"
811 }
812 ]
813 },
814 "DoubleQuotedStringLiteral": {
815 "name": "string.quoted.double.gnuplot",
816 "begin": "(\")",
817 "beginCaptures": {
818 "1": {
819 "name": "punctuation.definition.string.begin.gnuplot"
820 }
821 },
822 "end": "((\")|(?=(?<!\\\\)\\n$))",
823 "endCaptures": {
824 "0": {
825 "name": "punctuation.definition.string.end.gnuplot"
826 }
827 },
828 "patterns": [
829 {
830 "include": "#EscapedChar"
831 },
832 {
833 "include": "#RGBColorSpec"
834 },
835 {
836 "include": "#DeprecatedScriptArgsLiteral"
837 },
838 {
839 "include": "#InterpolatedStringLiteral"
840 }
841 ]
842 },
843 "InterpolatedStringLiteral": {
844 "name": "string.interpolated.gnuplot",
845 "begin": "(`)",
846 "beginCaptures": {
847 "1": {
848 "name": "punctuation.definition.string.begin.gnuplot"
849 }
850 },
851 "end": "((`)|(?=(?<!\\\\)\\n$))",
852 "endCaptures": {
853 "0": {
854 "name": "punctuation.definition.string.end.gnuplot"
855 }
856 },
857 "patterns": [
858 {
859 "include": "#EscapedChar"
860 }
861 ]
862 },
863 "RGBColorSpec": {
864 "name": "constant.other.placeholder.gnuplot",
865 "match": "\\G(0x|#)(([0-9a-fA-F]{6})|([0-9a-fA-F]{8}))\\b"
866 },
867 "EscapedChar": {
868 "name": "constant.character.escape.gnuplot",
869 "match": "(\\\\.)"
870 },
871 "LineComment": {
872 "name": "comment.line.number-sign.gnuplot",
873 "begin": "(#)",
874 "beginCaptures": {
875 "1": {
876 "name": "punctuation.definition.comment.begin.gnuplot"
877 }
878 },
879 "end": "(?=(?<!\\\\)\\n$)",
880 "endCaptures": {
881 "0": {
882 "name": "punctuation.definition.comment.end.gnuplot"
883 }
884 }
885 }
886 }
887 }
888