UNPKG

@abaplint/core

Version:
1,199 lines • 50.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.BuiltIn = exports.BuiltInMethod = void 0; const _typed_identifier_1 = require("../types/_typed_identifier"); const basic_1 = require("../types/basic"); const tokens_1 = require("../1_lexer/tokens"); const position_1 = require("../../position"); const visibility_1 = require("../4_file_information/visibility"); const _identifier_1 = require("../4_file_information/_identifier"); const version_1 = require("../../version"); class BuiltInMethod extends _identifier_1.Identifier { constructor(token, filename, method, row) { super(token, filename); this.method = method; this.row = row; } getRequiredParameters() { const ret = []; for (const i in this.method.mandatory) { const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i); ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i])); } return ret; } getOptional() { throw new Error("BuiltInMethod->Method not implemented"); } getAll() { throw new Error("BuiltInMethod->getAll, Method not implemented"); } getEventName() { return undefined; } getEventClass() { return undefined; } getImporting() { const ret = []; for (const i in this.method.mandatory) { const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i); ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.mandatory[i])); } for (const i in this.method.optional) { const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), i); ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.optional[i])); } return ret; } getDefaultImporting() { if (this.method.mandatory === undefined) { return undefined; } const keys = Object.keys(this.method.mandatory); if (keys.length === 1) { return keys[0].toUpperCase(); } return undefined; } getExporting() { return []; } getRaising() { return []; } getChanging() { return []; } getReturning() { const id = new tokens_1.Identifier(new position_1.Position(this.row, 1), "ret"); return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, this.method.return); } getExceptions() { return []; } getVisibility() { return visibility_1.Visibility.Public; } isRedefinition() { return false; } isAbstract() { return false; } isStatic() { return false; } isEventHandler() { return false; } getParameters() { return this; } getParameterDefault(_parameter) { return undefined; } } exports.BuiltInMethod = BuiltInMethod; class BuiltIn { constructor() { this.row = 1; } static buildDefinition(method, name) { if (method.cache) { return method.cache; } const token = new tokens_1.Identifier(new position_1.Position(1, 1), name); const result = new BuiltInMethod(token, BuiltIn.filename, method, method.counter); method.cache = result; return result; } static searchBuiltin(name) { if (name === undefined) { return undefined; } const def = BuiltIn.methods[name.toUpperCase()]; if (def === undefined) { return undefined; } return this.buildDefinition(def, name); } static isPredicate(name) { if (name === undefined) { return undefined; } const def = BuiltIn.methods[name.toUpperCase()]; if (def === undefined) { return undefined; } return def.predicate; } getTypes() { const ret = this.buildSY(); { const id = new tokens_1.Identifier(new position_1.Position(1, 1), "abap_bool"); ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }))); } { const id = new tokens_1.Identifier(new position_1.Position(1, 1), "cursor"); ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, basic_1.IntegerType.get({ qualifiedName: "CURSOR", ddicName: "CURSOR" }))); } return ret; } get(extras) { const ret = []; if (BuiltIn.getCache.length === 0) { BuiltIn.getCache.push(...this.buildSY()); BuiltIn.getCache.push(this.buildVariable("screen")); BuiltIn.getCache.push(this.buildConstant("%_ENDIAN")); BuiltIn.getCache.push(this.buildConstant("%_CHARSIZE")); BuiltIn.getCache.push(this.buildConstant("%_BACKSPACE", new basic_1.CharacterType(1), "\b")); BuiltIn.getCache.push(this.buildConstant("%_CR_LF", new basic_1.CharacterType(2), "\r\n")); BuiltIn.getCache.push(this.buildConstant("%_FORMFEED", new basic_1.CharacterType(1), "\f")); BuiltIn.getCache.push(this.buildConstant("%_HORIZONTAL_TAB", new basic_1.CharacterType(1), "\t")); BuiltIn.getCache.push(this.buildConstant("%_MAXCHAR", new basic_1.CharacterType(1), Buffer.from("FDFF", "hex").toString())); BuiltIn.getCache.push(this.buildConstant("%_MINCHAR", new basic_1.CharacterType(1), Buffer.from("0000", "hex").toString())); BuiltIn.getCache.push(this.buildConstant("%_NEWLINE", new basic_1.CharacterType(1), "\n")); BuiltIn.getCache.push(this.buildConstant("%_VERTICAL_TAB", new basic_1.CharacterType(1), "\v")); BuiltIn.getCache.push(this.buildConstant("abap_false", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '")); BuiltIn.getCache.push(this.buildConstant("abap_true", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'")); BuiltIn.getCache.push(this.buildConstant("abap_undefined", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'-'")); BuiltIn.getCache.push(this.buildConstant("abap_off", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "' '")); BuiltIn.getCache.push(this.buildConstant("abap_on", new basic_1.CharacterType(1, { qualifiedName: "ABAP_BOOL", ddicName: "ABAP_BOOL" }), "'X'")); BuiltIn.getCache.push(this.buildConstant("col_background", basic_1.IntegerType.get(), "0")); BuiltIn.getCache.push(this.buildConstant("col_heading", basic_1.IntegerType.get(), "1")); BuiltIn.getCache.push(this.buildConstant("col_key", basic_1.IntegerType.get(), "4")); BuiltIn.getCache.push(this.buildConstant("col_negative", basic_1.IntegerType.get(), "6")); BuiltIn.getCache.push(this.buildConstant("col_group", basic_1.IntegerType.get(), "7")); BuiltIn.getCache.push(this.buildConstant("col_normal", basic_1.IntegerType.get(), "2")); BuiltIn.getCache.push(this.buildConstant("col_positive", basic_1.IntegerType.get(), "5")); BuiltIn.getCache.push(this.buildConstant("col_total", basic_1.IntegerType.get(), "3")); BuiltIn.getCache.push(this.buildConstant("space", new basic_1.CharacterType(1, { derivedFromConstant: true }), "' '")); } ret.push(...BuiltIn.getCache); for (const e of extras) { const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), e); ret.push(new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, basic_1.VoidType.get(e), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], "'?'")); } return ret; } ///////////////////////////// buildVariable(name) { const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name); return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, basic_1.VoidType.get(name), ["built-in" /* IdentifierMeta.BuiltIn */]); } buildSY() { const components = []; // NOTE: fields must be in correct sequence for the syntax check components.push({ name: "index", type: basic_1.IntegerType.get() }); components.push({ name: "pagno", type: basic_1.IntegerType.get() }); components.push({ name: "tabix", type: basic_1.IntegerType.get() }); components.push({ name: "tfill", type: basic_1.IntegerType.get() }); components.push({ name: "tlopc", type: basic_1.IntegerType.get() }); components.push({ name: "tmaxl", type: basic_1.IntegerType.get() }); components.push({ name: "toccu", type: basic_1.IntegerType.get() }); components.push({ name: "ttabc", type: basic_1.IntegerType.get() }); components.push({ name: "tstis", type: basic_1.IntegerType.get() }); components.push({ name: "ttabi", type: basic_1.IntegerType.get() }); components.push({ name: "dbcnt", type: basic_1.IntegerType.get() }); components.push({ name: "fdpos", type: basic_1.IntegerType.get() }); components.push({ name: "colno", type: basic_1.IntegerType.get() }); components.push({ name: "linct", type: basic_1.IntegerType.get() }); components.push({ name: "linno", type: basic_1.IntegerType.get() }); components.push({ name: "linsz", type: basic_1.IntegerType.get() }); components.push({ name: "pagct", type: basic_1.IntegerType.get() }); components.push({ name: "macol", type: basic_1.IntegerType.get() }); components.push({ name: "marow", type: basic_1.IntegerType.get() }); components.push({ name: "tleng", type: basic_1.IntegerType.get() }); components.push({ name: "sfoff", type: basic_1.IntegerType.get() }); components.push({ name: "willi", type: basic_1.IntegerType.get() }); components.push({ name: "lilli", type: basic_1.IntegerType.get() }); components.push({ name: "subrc", type: basic_1.IntegerType.get() }); components.push({ name: "fleng", type: basic_1.IntegerType.get() }); components.push({ name: "cucol", type: basic_1.IntegerType.get() }); components.push({ name: "curow", type: basic_1.IntegerType.get() }); components.push({ name: "lsind", type: basic_1.IntegerType.get() }); components.push({ name: "listi", type: basic_1.IntegerType.get() }); components.push({ name: "stepl", type: basic_1.IntegerType.get() }); components.push({ name: "tpagi", type: basic_1.IntegerType.get() }); components.push({ name: "winx1", type: basic_1.IntegerType.get() }); components.push({ name: "winy1", type: basic_1.IntegerType.get() }); components.push({ name: "winx2", type: basic_1.IntegerType.get() }); components.push({ name: "winy2", type: basic_1.IntegerType.get() }); components.push({ name: "winco", type: basic_1.IntegerType.get() }); components.push({ name: "winro", type: basic_1.IntegerType.get() }); components.push({ name: "windi", type: basic_1.IntegerType.get() }); components.push({ name: "srows", type: basic_1.IntegerType.get() }); components.push({ name: "scols", type: basic_1.IntegerType.get() }); components.push({ name: "loopc", type: basic_1.IntegerType.get() }); components.push({ name: "folen", type: basic_1.IntegerType.get() }); components.push({ name: "fodec", type: basic_1.IntegerType.get() }); components.push({ name: "tzone", type: basic_1.IntegerType.get() }); components.push({ name: "dayst", type: new basic_1.CharacterType(1) }); components.push({ name: "ftype", type: new basic_1.CharacterType(1) }); components.push({ name: "appli", type: new basic_1.HexType(2) }); components.push({ name: "fdayw", type: basic_1.AnyType.get() }); components.push({ name: "ccurs", type: new basic_1.PackedType(5, 0) }); components.push({ name: "ccurt", type: new basic_1.PackedType(5, 0) }); components.push({ name: "debug", type: new basic_1.CharacterType(1) }); components.push({ name: "ctype", type: new basic_1.CharacterType(1) }); components.push({ name: "input", type: new basic_1.CharacterType(1, { qualifiedName: "sy-input" }) }); components.push({ name: "langu", type: new basic_1.CharacterType(1, { qualifiedName: "sy-langu", conversionExit: "ISOLA" }) }); components.push({ name: "modno", type: basic_1.IntegerType.get() }); components.push({ name: "batch", type: new basic_1.CharacterType(1, { qualifiedName: "sy-batch" }) }); components.push({ name: "binpt", type: new basic_1.CharacterType(1, { qualifiedName: "sy-binpt" }) }); components.push({ name: "calld", type: new basic_1.CharacterType(1, { qualifiedName: "sy-calld" }) }); components.push({ name: "dynnr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dynnr" }) }); components.push({ name: "dyngr", type: new basic_1.CharacterType(4, { qualifiedName: "sy-dyngr" }) }); components.push({ name: "newpa", type: new basic_1.CharacterType(1) }); components.push({ name: "pri40", type: new basic_1.CharacterType(1) }); components.push({ name: "rstrt", type: new basic_1.CharacterType(1) }); components.push({ name: "wtitl", type: new basic_1.CharacterType(1, { qualifiedName: "sy-wtitl" }) }); components.push({ name: "cpage", type: basic_1.IntegerType.get() }); components.push({ name: "dbnam", type: new basic_1.CharacterType(20, { qualifiedName: "sy-dbnam" }) }); components.push({ name: "mandt", type: new basic_1.CharacterType(3, { qualifiedName: "sy-mandt" }) }); components.push({ name: "prefx", type: new basic_1.CharacterType(3) }); components.push({ name: "fmkey", type: new basic_1.CharacterType(3) }); components.push({ name: "pexpi", type: new basic_1.NumericType(1) }); components.push({ name: "prini", type: new basic_1.NumericType(1) }); components.push({ name: "primm", type: new basic_1.CharacterType(1) }); components.push({ name: "prrel", type: new basic_1.CharacterType(1) }); components.push({ name: "playo", type: new basic_1.CharacterType(5) }); components.push({ name: "prbig", type: new basic_1.CharacterType(1) }); components.push({ name: "playp", type: new basic_1.CharacterType(1) }); components.push({ name: "prnew", type: new basic_1.CharacterType(1) }); components.push({ name: "prlog", type: new basic_1.CharacterType(1) }); components.push({ name: "pdest", type: new basic_1.CharacterType(4, { qualifiedName: "sy-pdest" }) }); components.push({ name: "plist", type: new basic_1.CharacterType(12) }); components.push({ name: "pauth", type: new basic_1.NumericType(2) }); components.push({ name: "prdsn", type: new basic_1.CharacterType(6) }); components.push({ name: "pnwpa", type: new basic_1.CharacterType(1) }); components.push({ name: "callr", type: new basic_1.CharacterType(8, { qualifiedName: "sy-callr" }) }); components.push({ name: "repi2", type: new basic_1.CharacterType(40) }); components.push({ name: "rtitl", type: new basic_1.CharacterType(70) }); components.push({ name: "prrec", type: new basic_1.CharacterType(12) }); components.push({ name: "prtxt", type: new basic_1.CharacterType(68) }); components.push({ name: "prabt", type: new basic_1.CharacterType(12) }); components.push({ name: "lpass", type: new basic_1.CharacterType(4) }); components.push({ name: "nrpag", type: new basic_1.CharacterType(1) }); components.push({ name: "paart", type: new basic_1.CharacterType(16) }); components.push({ name: "prcop", type: new basic_1.NumericType(3) }); components.push({ name: "batzs", type: new basic_1.CharacterType(1) }); components.push({ name: "bspld", type: new basic_1.CharacterType(1) }); components.push({ name: "brep4", type: new basic_1.CharacterType(4) }); components.push({ name: "batzo", type: new basic_1.CharacterType(1) }); components.push({ name: "batzd", type: new basic_1.CharacterType(1) }); components.push({ name: "batzw", type: new basic_1.CharacterType(1) }); components.push({ name: "batzm", type: new basic_1.CharacterType(1) }); components.push({ name: "ctabl", type: new basic_1.CharacterType(4) }); components.push({ name: "dbsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-dbsys" }) }); components.push({ name: "dcsys", type: new basic_1.CharacterType(4) }); components.push({ name: "macdb", type: new basic_1.CharacterType(4) }); components.push({ name: "sysid", type: new basic_1.CharacterType(8, { qualifiedName: "sy-sysid" }) }); components.push({ name: "opsys", type: new basic_1.CharacterType(10, { qualifiedName: "sy-opsys" }) }); components.push({ name: "pfkey", type: new basic_1.CharacterType(20, { qualifiedName: "sy-pfkey" }) }); components.push({ name: "saprl", type: new basic_1.CharacterType(4, { qualifiedName: "sy-saprl" }) }); components.push({ name: "tcode", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tcode" }) }); components.push({ name: "ucomm", type: new basic_1.CharacterType(70, { qualifiedName: "sy-ucomm" }) }); components.push({ name: "cfwae", type: new basic_1.CharacterType(5) }); components.push({ name: "chwae", type: new basic_1.CharacterType(5) }); components.push({ name: "spono", type: new basic_1.CharacterType(10, { qualifiedName: "sy-spono" }) }); components.push({ name: "sponr", type: new basic_1.NumericType(10) }); components.push({ name: "waers", type: new basic_1.CharacterType(5) }); components.push({ name: "cdate", type: new basic_1.DateType() }); components.push({ name: "datum", type: new basic_1.DateType() }); components.push({ name: "slset", type: new basic_1.CharacterType(14, { qualifiedName: "sy-slset" }) }); components.push({ name: "subty", type: new basic_1.HexType(1) }); components.push({ name: "subcs", type: new basic_1.CharacterType(1) }); components.push({ name: "group", type: new basic_1.CharacterType(1) }); components.push({ name: "ffile", type: new basic_1.CharacterType(8) }); components.push({ name: "uzeit", type: new basic_1.TimeType() }); components.push({ name: "dsnam", type: new basic_1.CharacterType(8) }); components.push({ name: "tabid", type: new basic_1.CharacterType(8) }); components.push({ name: "tfdsn", type: new basic_1.CharacterType(8) }); components.push({ name: "uname", type: new basic_1.CharacterType(12, { qualifiedName: "sy-uname" }) }); components.push({ name: "lstat", type: new basic_1.CharacterType(16) }); components.push({ name: "abcde", type: new basic_1.CharacterType(26, { qualifiedName: "sy-abcde" }) }); components.push({ name: "marky", type: new basic_1.CharacterType(1) }); components.push({ name: "sfnam", type: new basic_1.CharacterType(30) }); components.push({ name: "tname", type: new basic_1.CharacterType(30) }); components.push({ name: "msgli", type: new basic_1.CharacterType(60, { qualifiedName: "sy-msgli" }) }); components.push({ name: "title", type: new basic_1.CharacterType(70, { qualifiedName: "sy-title" }) }); components.push({ name: "entry", type: new basic_1.CharacterType(72) }); components.push({ name: "lisel", type: new basic_1.CharacterType(255, { qualifiedName: "sy-lisel" }) }); components.push({ name: "uline", type: new basic_1.CharacterType(255, { qualifiedName: "sy-uline" }) }); components.push({ name: "xcode", type: new basic_1.CharacterType(70) }); components.push({ name: "cprog", type: new basic_1.CharacterType(40, { qualifiedName: "sy-cprog" }) }); components.push({ name: "xprog", type: new basic_1.CharacterType(40) }); components.push({ name: "xform", type: new basic_1.CharacterType(30) }); components.push({ name: "ldbpg", type: new basic_1.CharacterType(40, { qualifiedName: "sy-ldbpg" }) }); components.push({ name: "tvar0", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar0" }) }); components.push({ name: "tvar1", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar1" }) }); components.push({ name: "tvar2", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar2" }) }); components.push({ name: "tvar3", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar3" }) }); components.push({ name: "tvar4", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar4" }) }); components.push({ name: "tvar5", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar5" }) }); components.push({ name: "tvar6", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar6" }) }); components.push({ name: "tvar7", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar7" }) }); components.push({ name: "tvar8", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar8" }) }); components.push({ name: "tvar9", type: new basic_1.CharacterType(20, { qualifiedName: "sy-tvar9" }) }); components.push({ name: "msgid", type: new basic_1.CharacterType(20, { qualifiedName: "sy-msgid" }) }); components.push({ name: "msgty", type: new basic_1.CharacterType(1, { qualifiedName: "sy-msgty" }) }); components.push({ name: "msgno", type: new basic_1.NumericType(3, "sy-msgno") }); components.push({ name: "msgv1", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv1" }) }); components.push({ name: "msgv2", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv2" }) }); components.push({ name: "msgv3", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv3" }) }); components.push({ name: "msgv4", type: new basic_1.CharacterType(50, { qualifiedName: "sy-msgv4" }) }); components.push({ name: "oncom", type: new basic_1.CharacterType(1) }); components.push({ name: "vline", type: new basic_1.CharacterType(1, { qualifiedName: "sy-vline" }) }); components.push({ name: "winsl", type: new basic_1.CharacterType(79) }); components.push({ name: "staco", type: basic_1.IntegerType.get() }); components.push({ name: "staro", type: basic_1.IntegerType.get() }); components.push({ name: "datar", type: new basic_1.CharacterType(1, { qualifiedName: "sy-datar" }) }); components.push({ name: "host", type: new basic_1.CharacterType(32, { qualifiedName: "sy-host" }) }); components.push({ name: "locdb", type: new basic_1.CharacterType(1) }); components.push({ name: "locop", type: new basic_1.CharacterType(1) }); components.push({ name: "datlo", type: new basic_1.DateType() }); components.push({ name: "timlo", type: new basic_1.TimeType() }); components.push({ name: "zonlo", type: new basic_1.CharacterType(6, { qualifiedName: "sy-zonlo" }) }); const type = new basic_1.StructureType(components); const id1 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy"); const sy = new _typed_identifier_1.TypedIdentifier(id1, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]); const id2 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "syst"); const syst = new _typed_identifier_1.TypedIdentifier(id2, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]); // https://help.sap.com/doc/abapdocu_751_index_htm/7.51/en-us/abennews-610-system.htm const id3 = new tokens_1.Identifier(new position_1.Position(this.row++, 1), "sy-repid"); const syrepid = new _typed_identifier_1.TypedIdentifier(id3, BuiltIn.filename, new basic_1.CharacterType(40, { qualifiedName: "sy-repid" }), ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */]); return [sy, syst, syrepid]; } buildConstant(name, type, value) { const id = new tokens_1.Identifier(new position_1.Position(this.row++, 1), name); if (type === undefined) { type = basic_1.VoidType.get(name); } if (value === undefined) { value = "'?'"; } return new _typed_identifier_1.TypedIdentifier(id, BuiltIn.filename, type, ["read_only" /* IdentifierMeta.ReadOnly */, "built-in" /* IdentifierMeta.BuiltIn */], value); } } exports.BuiltIn = BuiltIn; BuiltIn.filename = "_builtin.prog.abap"; BuiltIn.counter = 1; BuiltIn.getCache = []; // todo: "pcre" vs "regex", only one of these parameters are allowed // todo: "pcre", only possible from 755 BuiltIn.methods = { "ABS": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), }, "ACOS": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "ASIN": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "ATAN": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "BIT-SET": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.IntegerType.get(), }, return: basic_1.XStringType.get(), version: version_1.Version.v702, }, "BOOLC": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "BOOLX": { counter: BuiltIn.counter++, mandatory: { "bool": basic_1.CLikeType.get(), }, optional: { "bit": basic_1.IntegerType.get(), }, return: basic_1.XStringType.get(), version: version_1.Version.v702, }, "CEIL": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), }, "CHAR_OFF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "add": basic_1.IntegerType.get(), }, optional: { "off": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "CHARLEN": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), }, "CMAX": { counter: BuiltIn.counter++, mandatory: { "val1": basic_1.CLikeType.get(), "val2": basic_1.CLikeType.get(), }, optional: { "val3": basic_1.CLikeType.get(), "val4": basic_1.CLikeType.get(), "val5": basic_1.CLikeType.get(), "val6": basic_1.CLikeType.get(), "val7": basic_1.CLikeType.get(), "val9": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "CMIN": { counter: BuiltIn.counter++, mandatory: { "val1": basic_1.CLikeType.get(), "val2": basic_1.CLikeType.get(), }, optional: { "val3": basic_1.CLikeType.get(), "val4": basic_1.CLikeType.get(), "val5": basic_1.CLikeType.get(), "val6": basic_1.CLikeType.get(), "val7": basic_1.CLikeType.get(), "val9": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "CONCAT_LINES_OF": { counter: BuiltIn.counter++, mandatory: { "table": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }), }, optional: { "sep": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "CONDENSE": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "del": basic_1.CLikeType.get(), "from": basic_1.CLikeType.get(), "to": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "CONTAINS": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "start": basic_1.CLikeType.get(), "end": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: new basic_1.CharacterType(1), predicate: true, version: version_1.Version.v702, }, "CONTAINS_ANY_NOT_OF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "start": basic_1.CLikeType.get(), "end": basic_1.CLikeType.get(), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, predicate: true, return: new basic_1.CharacterType(1), version: version_1.Version.v702, }, "CONTAINS_ANY_OF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "start": basic_1.CLikeType.get(), "end": basic_1.CLikeType.get(), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: new basic_1.CharacterType(1), predicate: true, version: version_1.Version.v702, }, "COS": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "COSH": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "COUNT": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "COUNT_ANY_NOT_OF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "COUNT_ANY_OF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "DBMAXLEN": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), }, "DISTANCE": { counter: BuiltIn.counter++, mandatory: { "val1": basic_1.CLikeType.get(), "val2": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "ESCAPE": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "format": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "EXP": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "FIND": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "FIND_ANY_NOT_OF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "FIND_ANY_OF": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "FIND_END": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "FLOOR": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), }, "FRAC": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), }, "FROM_MIXED": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get() }, optional: { "case": new basic_1.CharacterType(1), "sep": basic_1.IntegerType.get(), "min": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "INSERT": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "sub": basic_1.CLikeType.get(), }, optional: { "off": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "IPOW": { counter: BuiltIn.counter++, mandatory: { "base": new basic_1.FloatType(), "exp": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v740sp02, }, "LINE_EXISTS": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.AnyType.get(), }, return: new basic_1.CharacterType(1), predicate: true, version: version_1.Version.v740sp02, }, "LINE_INDEX": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.AnyType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v740sp02, }, "LINES": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.TableType(basic_1.AnyType.get(), { withHeader: false, keyType: basic_1.TableKeyType.default }), }, return: basic_1.IntegerType.get(), }, "LOG": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "LOG10": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "MATCH": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "case": new basic_1.CharacterType(1), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "MATCHES": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "case": new basic_1.CharacterType(1), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), }, return: new basic_1.CharacterType(1), predicate: true, version: version_1.Version.v702, }, "NMAX": { counter: BuiltIn.counter++, mandatory: { "val1": basic_1.CLikeType.get(), "val2": basic_1.CLikeType.get(), }, optional: { "val3": basic_1.CLikeType.get(), "val4": basic_1.CLikeType.get(), "val5": basic_1.CLikeType.get(), "val6": basic_1.CLikeType.get(), "val7": basic_1.CLikeType.get(), "val8": basic_1.CLikeType.get(), "val9": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "NMIN": { counter: BuiltIn.counter++, mandatory: { "val1": basic_1.CLikeType.get(), "val2": basic_1.CLikeType.get(), }, optional: { "val3": basic_1.CLikeType.get(), "val4": basic_1.CLikeType.get(), "val5": basic_1.CLikeType.get(), "val6": basic_1.CLikeType.get(), "val7": basic_1.CLikeType.get(), "val8": basic_1.CLikeType.get(), "val9": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "NUMOFCHAR": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), }, "REPEAT": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "occ": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "REPLACE": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "with": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "RESCALE": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, optional: { "dec": basic_1.IntegerType.get(), "prec": basic_1.IntegerType.get(), "mode": basic_1.IntegerType.get(), }, return: new basic_1.FloatType(), version: version_1.Version.v702, }, "REVERSE": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "ROUND": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, optional: { "dec": basic_1.IntegerType.get(), "prec": basic_1.IntegerType.get(), "mode": basic_1.IntegerType.get(), }, return: basic_1.IntegerType.get(), version: version_1.Version.v702, }, "SEGMENT": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "index": basic_1.IntegerType.get(), }, optional: { "sep": basic_1.CLikeType.get(), "space": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SHIFT_LEFT": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "places": basic_1.IntegerType.get(), "circular": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SHIFT_RIGHT": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "places": basic_1.IntegerType.get(), "circular": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SIGN": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), }, "SIN": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "SINH": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "SQRT": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "STRLEN": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.IntegerType.get(), }, "SUBSTRING": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "off": basic_1.IntegerType.get(), "len": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SUBSTRING_AFTER": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SUBSTRING_BEFORE": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SUBSTRING_FROM": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "SUBSTRING_TO": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "sub": basic_1.CLikeType.get(), "regex": basic_1.CLikeType.get(), "pcre": basic_1.CLikeType.get(), "case": new basic_1.CharacterType(1), "len": basic_1.IntegerType.get(), "occ": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "TAN": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "TANH": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: new basic_1.FloatType(), }, "TO_LOWER": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "TO_MIXED": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, optional: { "case": new basic_1.CharacterType(1), "sep": basic_1.CLikeType.get(), "min": basic_1.IntegerType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "TO_UPPER": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get() }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "TRANSLATE": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), "from": basic_1.CLikeType.get(), "to": basic_1.CLikeType.get(), }, return: basic_1.StringType.get(), version: version_1.Version.v702, }, "TRUNC": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.FloatType(), }, return: basic_1.IntegerType.get(), }, "UTCLONG_ADD": { counter: BuiltIn.counter++, mandatory: { "val": new basic_1.UTCLongType(), }, optional: { "days": basic_1.IntegerType.get(), "hour": basic_1.IntegerType.get(), "minutes": basic_1.IntegerType.get(), "seconds": new basic_1.FloatType(), }, return: new basic_1.UTCLongType(), version: version_1.Version.v754, }, "UTCLONG_CURRENT": { counter: BuiltIn.counter++, return: new basic_1.UTCLongType(), version: version_1.Version.v754, }, "UTCLONG_DIFF": { counter: BuiltIn.counter++, mandatory: { "high": new basic_1.UTCLongType(), "low": new basic_1.UTCLongType(), }, return: new basic_1.FloatType(), version: version_1.Version.v754, }, "XSDBOOL": { counter: BuiltIn.counter++, mandatory: { "val": basic_1.CLikeType.get(), }, return: new basic_1.CharacterType(1), version: version_1.Version.v740sp08, }, "XSTRLEN": { counte