123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457 |
- /*!-----------------------------------------------------------------------------
- * Copyright (c) Microsoft Corporation. All rights reserved.
- * Version: 0.31.1(337587859b1c171314b40503171188b6cea6a32a)
- * Released under the MIT license
- * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
- *-----------------------------------------------------------------------------*/
- // src/basic-languages/ecl/ecl.ts
- var conf = {
- comments: {
- lineComment: "//",
- blockComment: ["/*", "*/"]
- },
- brackets: [
- ["{", "}"],
- ["[", "]"],
- ["(", ")"]
- ],
- autoClosingPairs: [
- { open: "{", close: "}" },
- { open: "[", close: "]" },
- { open: "(", close: ")" },
- { open: "'", close: "'", notIn: ["string", "comment"] },
- { open: '"', close: '"', notIn: ["string", "comment"] }
- ],
- surroundingPairs: [
- { open: "{", close: "}" },
- { open: "[", close: "]" },
- { open: "(", close: ")" },
- { open: "<", close: ">" },
- { open: "'", close: "'" },
- { open: '"', close: '"' }
- ]
- };
- var language = {
- defaultToken: "",
- tokenPostfix: ".ecl",
- ignoreCase: true,
- brackets: [
- { open: "{", close: "}", token: "delimiter.curly" },
- { open: "[", close: "]", token: "delimiter.square" },
- { open: "(", close: ")", token: "delimiter.parenthesis" },
- { open: "<", close: ">", token: "delimiter.angle" }
- ],
- pounds: [
- "append",
- "break",
- "declare",
- "demangle",
- "end",
- "for",
- "getdatatype",
- "if",
- "inmodule",
- "loop",
- "mangle",
- "onwarning",
- "option",
- "set",
- "stored",
- "uniquename"
- ].join("|"),
- keywords: [
- "__compressed__",
- "after",
- "all",
- "and",
- "any",
- "as",
- "atmost",
- "before",
- "beginc",
- "best",
- "between",
- "case",
- "cluster",
- "compressed",
- "compression",
- "const",
- "counter",
- "csv",
- "default",
- "descend",
- "embed",
- "encoding",
- "encrypt",
- "end",
- "endc",
- "endembed",
- "endmacro",
- "enum",
- "escape",
- "except",
- "exclusive",
- "expire",
- "export",
- "extend",
- "fail",
- "few",
- "fileposition",
- "first",
- "flat",
- "forward",
- "from",
- "full",
- "function",
- "functionmacro",
- "group",
- "grouped",
- "heading",
- "hole",
- "ifblock",
- "import",
- "in",
- "inner",
- "interface",
- "internal",
- "joined",
- "keep",
- "keyed",
- "last",
- "left",
- "limit",
- "linkcounted",
- "literal",
- "little_endian",
- "load",
- "local",
- "locale",
- "lookup",
- "lzw",
- "macro",
- "many",
- "maxcount",
- "maxlength",
- "min skew",
- "module",
- "mofn",
- "multiple",
- "named",
- "namespace",
- "nocase",
- "noroot",
- "noscan",
- "nosort",
- "not",
- "noxpath",
- "of",
- "onfail",
- "only",
- "opt",
- "or",
- "outer",
- "overwrite",
- "packed",
- "partition",
- "penalty",
- "physicallength",
- "pipe",
- "prefetch",
- "quote",
- "record",
- "repeat",
- "retry",
- "return",
- "right",
- "right1",
- "right2",
- "rows",
- "rowset",
- "scan",
- "scope",
- "self",
- "separator",
- "service",
- "shared",
- "skew",
- "skip",
- "smart",
- "soapaction",
- "sql",
- "stable",
- "store",
- "terminator",
- "thor",
- "threshold",
- "timelimit",
- "timeout",
- "token",
- "transform",
- "trim",
- "type",
- "unicodeorder",
- "unordered",
- "unsorted",
- "unstable",
- "update",
- "use",
- "validate",
- "virtual",
- "whole",
- "width",
- "wild",
- "within",
- "wnotrim",
- "xml",
- "xpath"
- ],
- functions: [
- "abs",
- "acos",
- "aggregate",
- "allnodes",
- "apply",
- "ascii",
- "asin",
- "assert",
- "asstring",
- "atan",
- "atan2",
- "ave",
- "build",
- "buildindex",
- "case",
- "catch",
- "choose",
- "choosen",
- "choosesets",
- "clustersize",
- "combine",
- "correlation",
- "cos",
- "cosh",
- "count",
- "covariance",
- "cron",
- "dataset",
- "dedup",
- "define",
- "denormalize",
- "dictionary",
- "distribute",
- "distributed",
- "distribution",
- "ebcdic",
- "enth",
- "error",
- "evaluate",
- "event",
- "eventextra",
- "eventname",
- "exists",
- "exp",
- "fail",
- "failcode",
- "failmessage",
- "fetch",
- "fromunicode",
- "fromxml",
- "getenv",
- "getisvalid",
- "global",
- "graph",
- "group",
- "hash",
- "hash32",
- "hash64",
- "hashcrc",
- "hashmd5",
- "having",
- "httpcall",
- "httpheader",
- "if",
- "iff",
- "index",
- "intformat",
- "isvalid",
- "iterate",
- "join",
- "keydiff",
- "keypatch",
- "keyunicode",
- "length",
- "library",
- "limit",
- "ln",
- "loadxml",
- "local",
- "log",
- "loop",
- "map",
- "matched",
- "matchlength",
- "matchposition",
- "matchtext",
- "matchunicode",
- "max",
- "merge",
- "mergejoin",
- "min",
- "nofold",
- "nolocal",
- "nonempty",
- "normalize",
- "nothor",
- "notify",
- "output",
- "parallel",
- "parse",
- "pipe",
- "power",
- "preload",
- "process",
- "project",
- "pull",
- "random",
- "range",
- "rank",
- "ranked",
- "realformat",
- "recordof",
- "regexfind",
- "regexreplace",
- "regroup",
- "rejected",
- "rollup",
- "round",
- "roundup",
- "row",
- "rowdiff",
- "sample",
- "sequential",
- "set",
- "sin",
- "sinh",
- "sizeof",
- "soapcall",
- "sort",
- "sorted",
- "sqrt",
- "stepped",
- "stored",
- "sum",
- "table",
- "tan",
- "tanh",
- "thisnode",
- "topn",
- "tounicode",
- "toxml",
- "transfer",
- "transform",
- "trim",
- "truncate",
- "typeof",
- "ungroup",
- "unicodeorder",
- "variance",
- "wait",
- "which",
- "workunit",
- "xmldecode",
- "xmlencode",
- "xmltext",
- "xmlunicode"
- ],
- typesint: ["integer", "unsigned"].join("|"),
- typesnum: ["data", "qstring", "string", "unicode", "utf8", "varstring", "varunicode"],
- typesone: [
- "ascii",
- "big_endian",
- "boolean",
- "data",
- "decimal",
- "ebcdic",
- "grouped",
- "integer",
- "linkcounted",
- "pattern",
- "qstring",
- "real",
- "record",
- "rule",
- "set of",
- "streamed",
- "string",
- "token",
- "udecimal",
- "unicode",
- "unsigned",
- "utf8",
- "varstring",
- "varunicode"
- ].join("|"),
- operators: ["+", "-", "/", ":=", "<", "<>", "=", ">", "\\", "and", "in", "not", "or"],
- symbols: /[=><!~?:&|+\-*\/\^%]+/,
- escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
- tokenizer: {
- root: [
- [/@typesint[4|8]/, "type"],
- [/#(@pounds)/, "type"],
- [/@typesone/, "type"],
- [
- /[a-zA-Z_$][\w-$]*/,
- {
- cases: {
- "@functions": "keyword.function",
- "@keywords": "keyword",
- "@operators": "operator"
- }
- }
- ],
- { include: "@whitespace" },
- [/[{}()\[\]]/, "@brackets"],
- [/[<>](?!@symbols)/, "@brackets"],
- [
- /@symbols/,
- {
- cases: {
- "@operators": "delimiter",
- "@default": ""
- }
- }
- ],
- [/[0-9_]*\.[0-9_]+([eE][\-+]?\d+)?/, "number.float"],
- [/0[xX][0-9a-fA-F_]+/, "number.hex"],
- [/0[bB][01]+/, "number.hex"],
- [/[0-9_]+/, "number"],
- [/[;,.]/, "delimiter"],
- [/"([^"\\]|\\.)*$/, "string.invalid"],
- [/"/, "string", "@string"],
- [/'[^\\']'/, "string"],
- [/(')(@escapes)(')/, ["string", "string.escape", "string"]],
- [/'/, "string.invalid"]
- ],
- whitespace: [
- [/[ \t\v\f\r\n]+/, ""],
- [/\/\*/, "comment", "@comment"],
- [/\/\/.*$/, "comment"]
- ],
- comment: [
- [/[^\/*]+/, "comment"],
- [/\*\//, "comment", "@pop"],
- [/[\/*]/, "comment"]
- ],
- string: [
- [/[^\\']+/, "string"],
- [/@escapes/, "string.escape"],
- [/\\./, "string.escape.invalid"],
- [/'/, "string", "@pop"]
- ]
- }
- };
- export {
- conf,
- language
- };
|