{ "name": "gnuplot", "scopeName": "source.gnuplot", "uuid": "A75AB1C2-611C-4500-9EE4-20668B5BB465", "fileTypes": ["gp", "plt", "plot", "gnuplot"], "patterns": [ { "name": "invalid.illegal.backslash.gnuplot", "match": "(\\\\(?!\\n).*)" }, { "name": "punctuation.separator.statement.gnuplot", "match": "(;)" }, { "include": "#LineComment" }, { "include": "#DataBlock" }, { "include": "#MacroExpansion" }, { "include": "#VariableDecl" }, { "include": "#ArrayDecl" }, { "include": "#FunctionDecl" }, { "include": "#ShellCommand" }, { "include": "#Command" } ], "repository": { "DataBlock": { "name": "meta.datablock.gnuplot", "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)", "beginCaptures": { "1": { "patterns": [ { "include": "#SpecialVariable" } ] }, "3": { "name": "constant.language.datablock.gnuplot" } }, "end": "^(\\3)\\b(.*)", "endCaptures": { "1": { "name": "constant.language.datablock.gnuplot" }, "2": { "name": "invalid.illegal.datablock.gnuplot" } }, "patterns": [ { "include": "#LineComment" }, { "include": "#NumberLiteral" }, { "include": "#DoubleQuotedStringLiteral" } ] }, "MacroExpansion": { "begin": "([@][A-Za-z_]\\w*)", "beginCaptures": { "1": { "patterns": [ { "include": "#SpecialVariable" } ] } }, "end": "(?=(;|#|\\\\(?!\\n)|(?>|&|\\||\\^)" }, { "name": "keyword.operator.comparison.gnuplot", "match": "(==|!=|<=|<|>=|>)" }, { "name": "keyword.operator.assignment.gnuplot", "match": "(=)" }, { "name": "keyword.operator.arithmetic.gnuplot", "match": "(\\+|-|~|!)" }, { "name": "keyword.operator.arithmetic.gnuplot", "match": "(\\*\\*|\\+|-|\\*|/|%)" }, { "name": "keyword.operator.strings.gnuplot", "match": "(\\.|\\b(eq|ne)\\b)", "captures": { "2": { "name": "keyword.operator.word.gnuplot" } } } ] }, "BuiltinVariable": { "patterns": [ { "name": "invalid.deprecated.variable.gnuplot", "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" }, { "name": "support.constant.gnuplot", "match": "\\b(GPVAL_\\w*|MOUSE_\\w*)\\b" }, { "name": "support.variable.gnuplot", "match": "\\b(ARG[0-9C]|GPFUN_\\w*|FIT_\\w*|STATS_\\w*|pi|NaN)\\b" } ] }, "SpecialVariable": { "patterns": [ { "match": "(?<=[\\[:=])\\s*(\\*)\\s*(?=[:\\]])", "captures": { "1": { "name": "constant.language.wildcard.gnuplot" } } }, { "name": "constant.language.special.gnuplot", "match": "(([@$])[A-Za-z_]\\w*)\\b", "captures": { "2": { "name": "punctuation.definition.variable.gnuplot" } } } ] }, "BuiltinFunction": { "patterns": [ { "name": "invalid.deprecated.function.gnuplot", "match": "\\b(?x:\n\t\t\t\t\t\tdefined\n\t\t\t\t\t)\\b" }, { "name": "support.function.math.gnuplot", "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" }, { "name": "support.function.string.gnuplot", "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" }, { "name": "support.function.other.gnuplot", "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" } ] }, "Literal": { "patterns": [ { "include": "#NumberLiteral" }, { "include": "#DeprecatedScriptArgsLiteral" }, { "include": "#SingleQuotedStringLiteral" }, { "include": "#DoubleQuotedStringLiteral" }, { "include": "#InterpolatedStringLiteral" } ] }, "NumberLiteral": { "patterns": [ { "name": "constant.numeric.float.gnuplot", "match": "(?x:\n\t\t\t\t\t\t# .5e2 and 0.5e2\n\t\t\t\t\t\t( ((\\b[0-9]+)|(?