diff --git a/Build/tools/AccessKey.py b/Build/tools/AccessKey.py new file mode 100644 index 000000000..2f5579042 --- /dev/null +++ b/Build/tools/AccessKey.py @@ -0,0 +1,96 @@ +#-*- coding: UTF-8 -*- +from collections import OrderedDict + +def is_access_key(ch): + return (ch >= '0' and ch <= '9') or (ch >= 'A' and ch <= 'Z') or (ch >= 'a' and ch <= 'z') + +def find_access_key(menu): + key = [] + index = 0 + while index < len(menu): + ch = menu[index] + index += 1 + if ch == '&': + ch = menu[index] + if is_access_key(ch): + index += 1 + key.append(ch.upper()) + + if len(key) == 0: + raise ValueError('No access key: ' + menu) + if len(key) > 1: + raise ValueError('Multiply access key: ' + menu) + + return key[0] + +def find_free_access_key(menu, path): + all_key = {} + used_key = set() # from frozen line + + lines = [] + for line in menu.splitlines(): + line = line.strip() + if not line or line.startswith('//'): + continue + + start = line.find('"') + if start < 0: + continue + + start += 1 + end_cut = line.find('\t', start) + end = line.find('"', start) + if end <= start: + print('Error:', line) + continue + + if end_cut > 0 and end_cut < end: + end = end_cut + + used = line.endswith('//#') + line = line[start:end].strip() + + if used: + try: + key = find_access_key(line) + if key in used_key: + print('duplicate access key:', line) + else: + used_key.add(key) + except Exception as ex: + print('find access key fail:', line, ex) + else: + lines.append(line) + + if not lines: + return + + required = set() + for line in lines: + unique = set(ch.upper() for ch in line if is_access_key(ch)) + required |= unique + for ch in unique: + if ch not in used_key: + if ch in all_key: + all_key[ch].append(line) + else: + all_key[ch] = [line] + + if all_key: + all_key = OrderedDict(sorted(all_key.items(), key=lambda m: m[0])) + all_key = OrderedDict(sorted(all_key.items(), key=lambda m: len(m[1]))) + + print('write:', path) + with open(path, 'w', encoding='utf-8', newline='\n') as fd: + for key, lines in all_key.items(): + fd.write(key + ':\n') + for line in lines: + fd.write('\t' + line + '\n') + else: + print('No free access key:', lines) + print('required access key:', list(sorted(required))) + +# line starts with '//' is line comment +# line ends with '//#' is frozen, access key should not changed +find_free_access_key(''' +''', 'access_key.log') diff --git a/Build/tools/Bitmap.py b/Build/tools/Bitmap.py new file mode 100644 index 000000000..e03bc8b10 --- /dev/null +++ b/Build/tools/Bitmap.py @@ -0,0 +1,528 @@ +#-*- coding: UTF-8 -*- +import sys +import os +import struct +import math +from enum import IntEnum +from PIL import Image + +__all__ = ['Bitmap'] + +# https://en.wikipedia.org/wiki/BMP_file_format +class BitmapFileHeader(object): + StructureSize = 14 + + def __init__(self): + self.size = 0 + self.reserved1 = 0 + self.reserved2 = 0 + self.offset = 54 + + def read(self, fd): + magic = fd.read(2) + assert magic == b'BM' + self.size = struct.unpack(' width: + total -= w + break + used.append(w) + w = width - total + if w: + used.append(w) + dims = used + + total = 0 + bmps = [] + for w in dims: + bmp = Bitmap(w, height) + for y in range(height): + bmp.rows[y].clear() + bmp.rows[y].extend(self.rows[y][total:total + w]) + total += w + bmps.append(bmp) + + return bmps + + @staticmethod + def concatVertical(bmps): + width = 0 + height = 0 + for bmp in bmps: + height += bmp.height + if width == 0: + width = bmp.width + elif width != bmp.width: + raise ValueError(f'Invalid image width {bmp.width}, requre {width}!') + + out_bmp = Bitmap(width, height) + rows = out_bmp.rows + rows.clear() + for bmp in bmps: + for row in bmp.rows: + rows.append(row[:]) + + return out_bmp + + def splitVertical(self, dims=None): + width, height = self.size + if not dims: + dims = [width] * (height // width) + h = height % width + if h: + dims.append(h) + else: + used = [] + total = 0 + for h in dims: + total += h + if total > height: + total -= h + break + used.append(h) + h = height - total + if h: + used.append(h) + dims = used + + total = 0 + bmps = [] + for h in dims: + bmp = Bitmap(width, h) + bmp.rows.clear() + for row in self.rows[total:total + h]: + bmp.rows.append(row[:]) + total += h + bmps.append(bmp) + return bmps + + def flipHorizontal(self): + width, height = self.size + bmp = Bitmap(width, height) + bmp.rows.clear() + for row in self.rows: + copy = row[:] + copy.reverse() + bmp.rows.append(copy) + return bmp + + def flipVertical(self): + width, height = self.size + bmp = Bitmap(width, height) + bmp.rows.clear() + for row in reversed(self.rows): + bmp.rows.append(row[:]) + return bmp diff --git a/Build/tools/CountColor.py b/Build/tools/CountColor.py new file mode 100644 index 000000000..3d7ec90d8 --- /dev/null +++ b/Build/tools/CountColor.py @@ -0,0 +1,83 @@ +#-*- coding: UTF-8 -*- +from __future__ import print_function +import sys +import os.path +from collections import OrderedDict +import operator +import re + +kReColorHex = re.compile(r'#[0-9A-Fa-f]{6}') + +def parse_key_value(line): + line = line.strip() + if not line or line[0] in ';#[': + return None + + items = line.split('=', 2) + if not items or len(items) != 2: + return None + + items[0] = items[0].strip() + items[1] = items[1].strip() + if not items[0] or not items[1]: + return None + + return items + +def find_color_in_file(path, color_map): + for line in open(path).readlines(): + items = parse_key_value(line) + if not items: + continue + + colors = kReColorHex.findall(items[1]) + if not colors: + continue + + key = items[0] + for color in colors: + color = color.upper() + if color in color_map: + color_stat = color_map[color] + color_stat['total_count'] += 1 + if key not in color_stat['usage']: + color_stat['usage'][key] = 1 + else: + color_stat['usage'][key] += 1 + else: + color_stat = { + 'total_count': 1, + 'usage': { + key: 1, + }, + } + color_map[color] = color_stat + +def print_color_count(color_map): + for color, color_stat in color_map.items(): + print('%s\t%d' % (color, color_stat['total_count'])) + usage = color_stat['usage'] + for key, count in usage.items(): + print('\t%d\t%s' % (count, key)) + +def count_color(path): + # { color : { total_count: total_count, usage: { key: count}}} + color_map = {} + find_color_in_file(path, color_map) + + colors = sorted(color_map.items(), key=operator.itemgetter(0)) + colors = sorted(colors, key=lambda m: m[1]['total_count'], reverse=True) + color_map = OrderedDict(colors) + for color_stat in color_map.values(): + usage = color_stat['usage'] + usage = sorted(usage.items(), key=operator.itemgetter(0)) + usage = sorted(usage, key=operator.itemgetter(1), reverse=True) + color_stat['usage'] = OrderedDict(usage) + + print_color_count(color_map) + +if __name__ == '__main__': + if len(sys.argv) > 1 and os.path.isfile(sys.argv[1]): + count_color(sys.argv[1]) + else: + print("""Usage: %s path""" % sys.argv[0]) diff --git a/Build/tools/FindPrime.py b/Build/tools/FindPrime.py new file mode 100644 index 000000000..ce781cd3a --- /dev/null +++ b/Build/tools/FindPrime.py @@ -0,0 +1,39 @@ +#-*- coding: UTF-8 -*- +from __future__ import print_function +import sys +from math import sqrt + +def is_prime_odd(n): + m = int(sqrt(n)) + for k in range(3, m + 1, 2): + if (n % k) == 0: + return False + return True + +def find_prime(): + n = 2 + count = 1 + if len(sys.argv) > 1: + n = max(2, int(sys.argv[1])) + if len(sys.argv) > 2: + count = max(1, int(sys.argv[2])) + + result = [] + if n == 2: + result.append(2) + count -= 1 + if (n & 1) == 0: + n += 1 + + while count != 0: + while not is_prime_odd(n): + n += 2 + + result.append(n) + n += 2 + count -= 1 + + print('next prime:', result) + +if __name__ == '__main__': + find_prime() diff --git a/Build/tools/GenerateTable.py b/Build/tools/GenerateTable.py new file mode 100644 index 000000000..29a310b38 --- /dev/null +++ b/Build/tools/GenerateTable.py @@ -0,0 +1,12 @@ +#!/usr/bin/env python3 + +def GenerateEOLTable(): + table = [0] * 16 + table[ord('\n')] = 1 + table[ord('\r')] = 2 + line = ', '.join(str(c) for c in table) + line = line + ', // %02X - %02X' % (0, 15) + print('EOLTable:', line) + +if __name__ == '__main__': + GenerateEOLTable() diff --git a/Build/tools/ImageTool.py b/Build/tools/ImageTool.py new file mode 100644 index 000000000..b705c5dbc --- /dev/null +++ b/Build/tools/ImageTool.py @@ -0,0 +1,163 @@ +#!/usr/bin/env python3 +#-*- coding: UTF-8 -*- +import os.path +import re +from Bitmap import Bitmap + +def save_bitmap(bmp, path): + ext = os.path.splitext(path)[1].lower() + if ext == '.bmp': + bmp.save(path) + else: + img = bmp.toImage() + img.save(path) + +def dump_bitmap(path): + print('dump bitmap:', path) + bmp = Bitmap.fromFile(path) + print(bmp.fileHeader) + print(bmp.infoHeader) + + data_path = path + '.data' + print('write:', data_path, len(bmp.data)) + with open(data_path, 'wb') as fd: + fd.write(bmp.data) + + dump_path = os.path.splitext(path)[0] + '-dump.bmp' + print('write:', dump_path) + bmp.save(dump_path) + +def convert_image(path, out_path=None): + if not out_path: + name, ext = os.path.splitext(path) + if ext.lower() == 'bmp': + out_path = name + '-converted' + '.bmp' + else: + out_path = name + '.bmp' + + print('convert image:', path, '=>', out_path) + bmp = Bitmap.fromFileEx(path) + #bmp.resolution = (96, 96) + save_bitmap(bmp, out_path) + + +def concat_images(horizontal, paths, out_path): + if horizontal: + print('concat horizontal:', ', '.join(paths), '=>', out_path) + else: + print('concat vertical:', ', '.join(paths), '=>', out_path) + + bmps = [] + for path in paths: + bmp = Bitmap.fromFileEx(path) + bmps.append(bmp) + + if horizontal: + bmp = Bitmap.concatHorizontal(bmps) + else: + bmp = Bitmap.concatVertical(bmps) + save_bitmap(bmp, out_path) + +def concat_horizontal(paths, out_path): + concat_images(True, paths, out_path) + +def concat_vertical(paths, out_path): + concat_images(False, paths, out_path) + + +def save_bitmap_list(bmps, out_path, ext): + if not os.path.exists(out_path): + os.makedirs(out_path) + for index, bmp in enumerate(bmps): + path = os.path.join(out_path, f'{index}{ext}') + save_bitmap(bmp, path) + +def _parse_split_dims(item): + items = item.split() + dims = [] + for item in items: + m = re.match(r'(\d+)(x(\d+))?', item) + if m: + g = m.groups() + size = int(g[0]) + count = g[2] + if count: + dims.extend([size] * int(count)) + else: + dims.append(size) + else: + break + return dims + +def split_image(horizontal, path, dims=None, out_path=None, ext=None): + name, old_ext = os.path.splitext(path) + if not out_path: + out_path = name + '-split' + if not ext: + ext = old_ext + + if isinstance(dims, str): + dims = _parse_split_dims(dims) + if horizontal: + print('split horizontal:', path, dims, '=>', out_path) + else: + print('split vertical:', path, dims, '=>', out_path) + + bmp = Bitmap.fromFileEx(path) + if horizontal: + bmps = bmp.splitHorizontal(dims) + else: + bmps = bmp.splitVertical(dims) + save_bitmap_list(bmps, out_path, ext) + +def split_horizontal(path, dims=None, out_path=None, ext=None): + split_image(True, path, dims, out_path, ext) + +def split_vertical(path, dims=None, out_path=None, ext=None): + split_image(False, path, dims, out_path, ext) + + +def flip_image(horizontal, path, out_path=None): + if not out_path: + name, ext = os.path.splitext(path) + out_path = name + '-flip' + ext + if horizontal: + print('flip horizontal:', path, '=>', out_path) + else: + print('flip vertical:', path, '=>', out_path) + + bmp = Bitmap.fromFileEx(path) + if horizontal: + bmp = bmp.flipHorizontal() + else: + bmp = bmp.flipVertical() + save_bitmap(bmp, out_path) + +def flip_horizontal(path, out_path=None): + flip_image(True, path, out_path) + +def flip_vertical(path, out_path=None): + flip_image(False, path, out_path) + + +def make_matapath_toolbar_bitmap(): + concat_horizontal([ + 'images/Previous_16x.png', # IDT_HISTORY_BACK + 'images/Next_16x.png', # IDT_HISTORY_FORWARD + 'images/Upload_16x.png', # IDT_UP_DIR + 'images/OneLevelUp_16x.png', # IDT_ROOT_DIR + 'images/Favorite_16x.png', # IDT_VIEW_FAVORITES + 'images/NextDocument_16x.png', # IDT_FILE_PREV + 'images/NextDocument_16x.png', # IDT_FILE_NEXT + 'images/Run_16x.png', # IDT_FILE_RUN + 'images/PrintPreview_16x.png', # IDT_FILE_QUICKVIEW + 'images/Save_16x.png', # IDT_FILE_SAVEAS + 'images/CopyItem_16x.png', # IDT_FILE_COPYMOVE + 'images/RestoreFromRecycleBin_16x.png', # IDT_FILE_DELETE_RECYCLE + 'images/RedCrossMark_16x.png', # IDT_FILE_DELETE_PERM + 'images/DeleteFilter_16x.png', # IDT_VIEW_FILTER TB_DEL_FILTER_BMP + 'images/AddFilter_16x.png', # IDT_VIEW_FILTER TB_ADD_FILTER_BMP + ], 'Toolbar.bmp') + +#make_matapath_toolbar_bitmap() +#split_horizontal('Toolbar.bmp', '16x40') diff --git a/Build/tools/StringSwitch.py b/Build/tools/StringSwitch.py new file mode 100644 index 000000000..a57efe9b5 --- /dev/null +++ b/Build/tools/StringSwitch.py @@ -0,0 +1,233 @@ +#-*- coding: UTF-8 -*- +from __future__ import print_function +from collections import OrderedDict +import operator + +# return true if equal +SwitchType_Equal = 0 +# do something if equal +SwitchType_IfMatch = 1 +# return literal string if equal +SwitchType_IfCached = 2 +# classify string in group list, return int or enum +SwitchType_Classify = 3 + +# when length bigger than this value, string is compared by using memcmp() or strncmp() +MaxSmallStringLength = 4 + +SwitchOption_HeadAndLength = 0 +SwitchOption_OnlyHead = 1 +SwitchOption_OnlyLength = 2 +SwitchOption_HashAndLength = 3 +SwitchOption_OnlyHash = 4 + +IndentChar = '\t' +#IndentChar = ' ' * 4 +IndentLevel1 = IndentChar +IndentLevel2 = IndentChar * 2 +IndentLevel3 = IndentChar * 3 + +# encoding for char* in C/C++ +CStringEncoding = 'utf-8' + +# https://en.wikipedia.org/wiki/Escape_sequences_in_C +_EscapeCharMap = { + 0x00: r'\0', + 0x07: r'\a', + 0x08: r'\b', + 0x0C: r'\f', + 0x0A: r'\n', + 0x0D: r'\r', + 0x09: r'\t', + 0x0B: r'\v', + 0x5C: r'\\', + 0x27: r'\'', + 0x22: r'\"', +} + +def cstr_escape(buf): + items = [] + for ch in buf: + if ch in _EscapeCharMap: + items.append(_EscapeCharMap[ch]) + elif ch < 32 or ch > 127: + items.append('\\x%02x' % ch) + else: + items.append(chr(ch)) + return ''.join(items) + +#define make_switch_key(length, ch) (((length) << 8) | (ch)) +def make_switch_key(length, ch, switch_option): + if switch_option == SwitchOption_HeadAndLength: + return "make_switch_key(%d, '%s')" % (length, cstr_escape(ch)) + if switch_option == SwitchOption_OnlyHead: + return "'%s'" % cstr_escape(ch) + if switch_option == SwitchOption_OnlyLength: + return str(length) + +def small_string_hash(buf, hash_size, switch_option): + value = 0 + mask = (1 << hash_size) - 1 + for ch in buf: + value = value * 3 + ch + value = value & mask + if switch_option == SwitchOption_HashAndLength: + value |= (len(buf) << hash_size); + return '0x%XU' % value + +def _make_small_string_cmp(var_name, buf, length, index): + expr_list = [] + while index < length: + expr = "%s[%d] == '%s'" % (var_name, index, cstr_escape(buf[index:index+1])) + expr_list.append(expr) + index += 1 + if len(expr_list) > 1: + return '(' + ' && '.join(expr_list) + ')' + return expr_list[0] + +def _get_switch_func_header(switch_type, func_name, var_name, option_set): + ret = '' + if switch_type == SwitchType_Equal: + ret = 'bool' + elif switch_type == SwitchType_IfMatch: + ret = 'void' + elif switch_type == SwitchType_IfCached: + ret = 'const char*' + elif switch_type == SwitchType_Classify: + ret = option_set['return_type'] + return '%s %s(const char *%s, int length) {\n' % (ret, func_name, var_name) + +def _get_switch_func_tail(switch_type, option_set): + ret = '' + if switch_type == SwitchType_Equal: + ret = 'false' + elif switch_type == SwitchType_IfCached: + ret = 'NULL' + elif switch_type == SwitchType_Classify: + ret = option_set['default'] + if ret: + ret = IndentLevel1 + 'return %s;\n' % (ret) + return ret + +def _get_switch_default_return(switch_type, option_set): + ret = _get_switch_func_tail(switch_type, option_set) + if not ret: + ret = IndentLevel1 + 'return;\n' + return ret + +def build_switch_stmt(switch_type, func_name, var_name, word_list, int_arg=0, switch_option=0): + option_set = None + sorted_list = [] + if switch_type == SwitchType_Classify: + option_set = word_list['option'] + groups = word_list['groups'] + for key, items in groups.items(): + for item in items: + buf = bytearray(item.encode(CStringEncoding)) + sorted_list.append((len(buf), buf, key)) + else: + for item in word_list: + buf = bytearray(item.encode(CStringEncoding)) + sorted_list.append((len(buf), buf)) + + cond_map = OrderedDict() + sorted_list.sort(key=operator.itemgetter(0)) # sorted by string length + for item in sorted_list: + length = item[0] + buf = item[1] + if switch_option == SwitchOption_HashAndLength or switch_option == SwitchOption_OnlyHash: + key = small_string_hash(buf, int_arg, switch_option) + else: + key = make_switch_key(length, buf[int_arg:int_arg+1], switch_option) + if key in cond_map: + cond_map[key].append(item) + else: + cond_map[key] = [item] + + stmt_list = [] + stmt = _get_switch_func_header(switch_type, func_name, var_name, option_set) + stmt_list.append(stmt) + + if switch_option != SwitchOption_OnlyLength: + stmt = IndentLevel1 + _get_switch_default_return(switch_type, option_set) + stmt = "if (length < %d || length > %d) {\n%s%s}\n" % \ + (sorted_list[0][0], sorted_list[-1][0], stmt, IndentLevel1) + stmt_list.append(IndentLevel1 + stmt) + + if switch_option == SwitchOption_HeadAndLength: + stmt = 'switch (make_switch_key(length, %s[%d])) {\n' % (var_name, int_arg) + elif switch_option == SwitchOption_OnlyHead: + stmt = 'switch (%s[%d]) {\n' % (var_name, int_arg) + elif switch_option == SwitchOption_OnlyLength: + stmt = 'switch (length) {\n' + elif switch_option == SwitchOption_HashAndLength or switch_option == SwitchOption_OnlyHash: + stmt = 'switch (small_string_hash(%s, length)) {\n' % (var_name) + int_arg = 0 + stmt_list.append(IndentLevel1 + stmt) + + for key, items in cond_map.items(): + stmt = IndentLevel1 + 'case %s:' % key + stmt_list.append(stmt); + expr_list = [] + items.sort(key=operator.itemgetter(1)) # sorted by string value + for item in items: + length = item[0] + buf = item[1] + expr = None + if switch_option != SwitchOption_OnlyHead and switch_option != SwitchOption_OnlyHash: + if int_arg or length > MaxSmallStringLength: + expr = 'memcmp(%s, "%s", %d) == 0' % (var_name, cstr_escape(buf), length) + elif length > 1: + expr = _make_small_string_cmp(var_name, buf, length, 1) + else: + expr = 'strncmp(%s, "%s", %d) == 0' % (var_name, cstr_escape(buf), length) + if expr: + expr_list.append(expr) + + if expr_list: + stmt_list.append('\n') + if switch_type == SwitchType_Equal: + stmt = 'return %s;\n' % ' || '.join(expr_list) + stmt_list.append(IndentLevel2 + stmt) + elif switch_type == SwitchType_IfMatch: + for expr in expr_list: + stmt = 'if (%s) {\n%s}\n' % (expr, IndentLevel2) + stmt_list.append(IndentLevel2 + stmt) + elif switch_type == SwitchType_IfCached: + for index, expr in enumerate(expr_list): + word = cstr_escape(items[index][1]) + stmt = 'if (%s)\n%sreturn "%s";\n' % (expr, IndentLevel3, word) + stmt_list.append(IndentLevel2 + stmt) + elif switch_type == SwitchType_Classify: + for index, expr in enumerate(expr_list): + stmt = 'if (%s)\n%sreturn %s;\n' % (expr, IndentLevel3, items[index][2]) + stmt_list.append(IndentLevel2 + stmt) + if switch_type != SwitchType_Equal: + stmt_list.append(IndentLevel2 + "break;\n") + else: + if switch_type != SwitchType_IfMatch: + stmt_list.append('\n') + if switch_type == SwitchType_Equal: + stmt = 'return true;\n' + stmt_list.append(IndentLevel2 + stmt) + elif switch_type == SwitchType_IfMatch: + stmt = ' {\n%s} break;\n' % IndentLevel1 + stmt_list.append(stmt) + elif switch_type == SwitchType_IfCached: + word = cstr_escape(items[0][1]) + stmt = 'return "%s";\n' % word + stmt_list.append(IndentLevel2 + stmt) + elif switch_type == SwitchType_Classify: + stmt = 'return %s;\n' % items[0][2] + stmt_list.append(IndentLevel2 + stmt) + + stmt_list.append(IndentLevel1 + '}\n') + stmt = _get_switch_func_tail(switch_type, option_set) + stmt_list.append(stmt + '}\n\n') + return ''.join(stmt_list) + +def build_switch_stmt_head(switch_type, func_name, var_name, word_list, ch_index=0, switch_option=SwitchOption_HeadAndLength): + return build_switch_stmt(switch_type, func_name, var_name, word_list, ch_index, switch_option) + +def build_switch_stmt_hash(switch_type, func_name, var_name, word_list, hash_size=16, switch_option=SwitchOption_HashAndLength): + return build_switch_stmt(switch_type, func_name, var_name, word_list, hash_size, switch_option) diff --git a/Build/tools/images/AddFilter_16x.png b/Build/tools/images/AddFilter_16x.png new file mode 100644 index 000000000..a8ae815ab Binary files /dev/null and b/Build/tools/images/AddFilter_16x.png differ diff --git a/Build/tools/images/AddFilter_16x.svg b/Build/tools/images/AddFilter_16x.svg new file mode 100644 index 000000000..233fab993 --- /dev/null +++ b/Build/tools/images/AddFilter_16x.svg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Build/tools/images/CopyItem_16x.png b/Build/tools/images/CopyItem_16x.png new file mode 100644 index 000000000..2f4d00d7e Binary files /dev/null and b/Build/tools/images/CopyItem_16x.png differ diff --git a/Build/tools/images/CopyItem_16x.svg b/Build/tools/images/CopyItem_16x.svg new file mode 100644 index 000000000..19c371ee9 --- /dev/null +++ b/Build/tools/images/CopyItem_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/DeleteFilter_16x.png b/Build/tools/images/DeleteFilter_16x.png new file mode 100644 index 000000000..7cc0d7afe Binary files /dev/null and b/Build/tools/images/DeleteFilter_16x.png differ diff --git a/Build/tools/images/DeleteFilter_16x.svg b/Build/tools/images/DeleteFilter_16x.svg new file mode 100644 index 000000000..df0649ee2 --- /dev/null +++ b/Build/tools/images/DeleteFilter_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/Favorite_16x.png b/Build/tools/images/Favorite_16x.png new file mode 100644 index 000000000..c75b5845e Binary files /dev/null and b/Build/tools/images/Favorite_16x.png differ diff --git a/Build/tools/images/Favorite_16x.svg b/Build/tools/images/Favorite_16x.svg new file mode 100644 index 000000000..9be72e711 --- /dev/null +++ b/Build/tools/images/Favorite_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/NextDocument_16x.png b/Build/tools/images/NextDocument_16x.png new file mode 100644 index 000000000..ad347b110 Binary files /dev/null and b/Build/tools/images/NextDocument_16x.png differ diff --git a/Build/tools/images/NextDocument_16x.svg b/Build/tools/images/NextDocument_16x.svg new file mode 100644 index 000000000..8901284bc --- /dev/null +++ b/Build/tools/images/NextDocument_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/Next_16x.png b/Build/tools/images/Next_16x.png new file mode 100644 index 000000000..575346ab6 Binary files /dev/null and b/Build/tools/images/Next_16x.png differ diff --git a/Build/tools/images/Next_16x.svg b/Build/tools/images/Next_16x.svg new file mode 100644 index 000000000..efe6e45a1 --- /dev/null +++ b/Build/tools/images/Next_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/OneLevelUp_16x.png b/Build/tools/images/OneLevelUp_16x.png new file mode 100644 index 000000000..3af244f77 Binary files /dev/null and b/Build/tools/images/OneLevelUp_16x.png differ diff --git a/Build/tools/images/OneLevelUp_16x.svg b/Build/tools/images/OneLevelUp_16x.svg new file mode 100644 index 000000000..a48e860d5 --- /dev/null +++ b/Build/tools/images/OneLevelUp_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/Previous_16x.png b/Build/tools/images/Previous_16x.png new file mode 100644 index 000000000..6fb9ac662 Binary files /dev/null and b/Build/tools/images/Previous_16x.png differ diff --git a/Build/tools/images/Previous_16x.svg b/Build/tools/images/Previous_16x.svg new file mode 100644 index 000000000..66b379cf2 --- /dev/null +++ b/Build/tools/images/Previous_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/PrintPreview_16x.png b/Build/tools/images/PrintPreview_16x.png new file mode 100644 index 000000000..6ef932aac Binary files /dev/null and b/Build/tools/images/PrintPreview_16x.png differ diff --git a/Build/tools/images/PrintPreview_16x.svg b/Build/tools/images/PrintPreview_16x.svg new file mode 100644 index 000000000..2cb40960d --- /dev/null +++ b/Build/tools/images/PrintPreview_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/RedCrossMark_16x.png b/Build/tools/images/RedCrossMark_16x.png new file mode 100644 index 000000000..35be73599 Binary files /dev/null and b/Build/tools/images/RedCrossMark_16x.png differ diff --git a/Build/tools/images/RedCrossMark_16x.svg b/Build/tools/images/RedCrossMark_16x.svg new file mode 100644 index 000000000..c53ebc792 --- /dev/null +++ b/Build/tools/images/RedCrossMark_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/RestoreFromRecycleBin_16x.png b/Build/tools/images/RestoreFromRecycleBin_16x.png new file mode 100644 index 000000000..cef49067d Binary files /dev/null and b/Build/tools/images/RestoreFromRecycleBin_16x.png differ diff --git a/Build/tools/images/RestoreFromRecycleBin_16x.svg b/Build/tools/images/RestoreFromRecycleBin_16x.svg new file mode 100644 index 000000000..b5da91659 --- /dev/null +++ b/Build/tools/images/RestoreFromRecycleBin_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/Run_16x.png b/Build/tools/images/Run_16x.png new file mode 100644 index 000000000..a5634bcab Binary files /dev/null and b/Build/tools/images/Run_16x.png differ diff --git a/Build/tools/images/Run_16x.svg b/Build/tools/images/Run_16x.svg new file mode 100644 index 000000000..0713e1502 --- /dev/null +++ b/Build/tools/images/Run_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/Save_16x.png b/Build/tools/images/Save_16x.png new file mode 100644 index 000000000..34a3c5b70 Binary files /dev/null and b/Build/tools/images/Save_16x.png differ diff --git a/Build/tools/images/Save_16x.svg b/Build/tools/images/Save_16x.svg new file mode 100644 index 000000000..e2a1dec56 --- /dev/null +++ b/Build/tools/images/Save_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/images/Upload_16x.png b/Build/tools/images/Upload_16x.png new file mode 100644 index 000000000..cddafb70b Binary files /dev/null and b/Build/tools/images/Upload_16x.png differ diff --git a/Build/tools/images/Upload_16x.svg b/Build/tools/images/Upload_16x.svg new file mode 100644 index 000000000..05e769b9d --- /dev/null +++ b/Build/tools/images/Upload_16x.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/Build/tools/lang/C.c b/Build/tools/lang/C.c new file mode 100644 index 000000000..a2f95cf0e --- /dev/null +++ b/Build/tools/lang/C.c @@ -0,0 +1,1303 @@ +// C99 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf +// C11 http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf +// https://en.cppreference.com/w/c +// https://en.cppreference.com/w/c/header + +_Alignas alignas +_Alignof alignof +_Atomic +_Generic +_Noreturn noreturn +_Static_assert static_assert +_Thread_local thread_local +break +case const continue +default do +else enum extern +for +goto +if +inline +register restrict return +sizeof static struct switch +typedef +union +void volatile +while + +_Bool bool _Complex complex _Imaginary imaginary +auto char double float int long short signed unsigned + +asm +fortran +// Predefined identifiers +__func__ +// Preprocessing directives +#if +#elif +#else +#endif +defined +#ifdef +#endif +#ifndef +#endif +#define +#undef +#include +#line +#error +#pragma +_Pragma() + +// Visual C++ Predefined Macros +// https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros +// GCC Predefined Macros +// https://gcc.gnu.org/onlinedocs/cpp/Predefined-Macros.html +// echo | clang -dM -E - +// echo | gcc -dM -E - +// https://software.intel.com/en-us/cpp-compiler-developer-guide-and-reference-additional-predefined-macros +// https://sourceforge.net/p/predef/wiki/Compilers/ + +#include +{ // Diagnostics + NDEBUG + void assert(scalar expression); + static_assert() // C11 + _Static_assert() // C11 +} + +#include +{ // Complex arithmetic + complex + _Complex + _Complex_I + imaginary + _Imaginary_I + _Imaginary + #pragma STDC CX_LIMITED_RANGE on-off-switch + + // Trigonometric functions + double complex cacos(double complex z); + float complex cacosf(float complex z); + long double complex cacosl(long double complex z); + double complex casin(double complex z); + float complex casinf(float complex z); + long double complex casinl(long double complex z); + double complex catan(double complex z); + float complex catanf(float complex z); + long double complex catanl(long double complex z); + double complex ccos(double complex z); + float complex ccosf(float complex z); + long double complex ccosl(long double complex z); + double complex csin(double complex z); + float complex csinf(float complex z); + long double complex csinl(long double complex z); + double complex ctan(double complex z); + float complex ctanf(float complex z); + long double complex ctanl(long double complex z); + // Hyperbolic functions + double complex cacosh(double complex z); + float complex cacoshf(float complex z); + long double complex cacoshl(long double complex z); + double complex casinh(double complex z); + float complex casinhf(float complex z); + long double complex casinhl(long double complex z); + double complex catanh(double complex z); + float complex catanhf(float complex z); + long double complex catanhl(long double complex z); + double complex ccosh(double complex z); + float complex ccoshf(float complex z); + long double complex ccoshl(long double complex z); + double complex csinh(double complex z); + float complex csinhf(float complex z); + long double complex csinhl(long double complex z); + double complex ctanh(double complex z); + float complex ctanhf(float complex z); + long double complex ctanhl(long double complex z); + // Exponential and logarithmic functions + double complex cexp(double complex z); + float complex cexpf(float complex z); + long double complex cexpl(long double complex z); + double complex clog(double complex z); + float complex clogf(float complex z); + long double complex clogl(long double complex z); + // Power and absolute-value functions + double cabs(double complex z); + float cabsf(float complex z); + long double cabsl(long double complex z); + double complex cpow(double complex x, double complex y); + float complex cpowf(float complex x, float complex y); + long double complex cpowl(long double complex x, long double complex y); + double complex csqrt(double complex z); + float complex csqrtf(float complex z); + long double complex csqrtl(long double complex z); + // Manipulation functions + double carg(double complex z); + float cargf(float complex z); + long double cargl(long double complex z); + double cimag(double complex z); + float cimagf(float complex z); + long double cimagl(long double complex z); + double complex CMPLX(double x, double y); + float complex CMPLXF(float x, float y); + long double complex CMPLXL(long double x, long double y); + double complex conj(double complex z); + float complex conjf(float complex z); + long double complex conjl(long double complex z); + double complex cproj(double complex z); + float complex cprojf(float complex z); + long double complex cprojl(long double complex z); + double creal(double complex z); + float crealf(float complex z); + long double creall(long double complex z); +} + +#include +{ // Character handling + // Character classification functions + int isalnum(int c); + int isalpha(int c); + int isblank(int c); + int iscntrl(int c); + int isdigit(int c); + int isgraph(int c); + int islower(int c); + int isprint(int c); + int ispunct(int c); + int isspace(int c); + int isupper(int c); + int isxdigit(int c); + // Character case mapping functions + int tolower(int c); + int toupper(int c); +} + +#include +{ // Errors + EDOM + EILSEQ + ERANGE + errno +} + +#include +{ // Floating-point environment + fenv_t + fexcept_t + FE_DIVBYZERO + FE_INEXACT + FE_INVALID + FE_OVERFLOW + FE_UNDERFLOW + FE_ALL_EXCEPT + FE_DOWNWARD + FE_TONEAREST + FE_TOWARDZERO + FE_UPWARD + FE_DFL_ENV + #pragma STDC FENV_ACCESS on-off-switch + + // Floating-point exceptions + int feclearexcept(int excepts); + int fegetexceptflag(fexcept_t *flagp, int excepts); + int feraiseexcept(int excepts); + int fesetexceptflag(const fexcept_t *flagp, int excepts); + int fetestexcept(int excepts); + // Rounding + int fegetround(void); + int fesetround(int round); + // Environment + int fegetenv(fenv_t *envp); + int feholdexcept(fenv_t *envp); + int fesetenv(const fenv_t *envp); + int feupdateenv(const fenv_t *envp); +} + +#include +{ // Characteristics of floating types + FLT_ROUNDS + FLT_EVAL_METHOD + FLT_HAS_SUBNORM + DBL_HAS_SUBNORM + LDBL_HAS_SUBNORM + FLT_RADIX + FLT_MANT_DIG + DBL_MANT_DIG + LDBL_MANT_DIG + FLT_DECIMAL_DIG + DBL_DECIMAL_DIG + LDBL_DECIMAL_DIG + DECIMAL_DIG + FLT_DIG + DBL_DIG + LDBL_DIG + FLT_MIN_EXP + DBL_MIN_EXP + LDBL_MIN_EXP + FLT_MIN_10_EXP + DBL_MIN_10_EXP + LDBL_MIN_10_EXP + FLT_MAX_EXP + DBL_MAX_EXP + LDBL_MAX_EXP + FLT_MAX_10_EXP + DBL_MAX_10_EXP + LDBL_MAX_10_EXP + FLT_MAX + DBL_MAX + LDBL_MAX + FLT_EPSILON + DBL_EPSILON + LDBL_EPSILON + FLT_MIN + DBL_MIN + LDBL_MIN + FLT_TRUE_MIN + DBL_TRUE_MIN + LDBL_TRUE_MIN +} + +#include +{ // Format conversion of integer types + imaxdiv_t + // Macros for format specifiers + // The fprintf macros for signed integers + PRId8 + PRId16 + PRId32 + PRId64 + PRIdLEAST8 + PRIdLEAST16 + PRIdLEAST32 + PRIdLEAST64 + PRIdFAST8 + PRIdFAST16 + PRIdFAST32 + PRIdFAST64 + PRIdMAX + PRIdPTR + PRIi8 + PRIi16 + PRIi32 + PRIi64 + PRIiLEAST8 + PRIiLEAST16 + PRIiLEAST32 + PRIiLEAST64 + PRIiFAST8 + PRIiFAST16 + PRIiFAST32 + PRIiFAST64 + PRIiMAX + PRIiPTR + // The fprintf macros for unsigned integers + PRIo8 + PRIo16 + PRIo32 + PRIo64 + PRIoLEAST8 + PRIoLEAST16 + PRIoLEAST32 + PRIoLEAST64 + PRIoFAST8 + PRIoFAST16 + PRIoFAST32 + PRIoFAST64 + PRIoMAX + PRIoPTR + PRIu8 + PRIu16 + PRIu32 + PRIu64 + PRIuLEAST8 + PRIuLEAST16 + PRIuLEAST32 + PRIuLEAST64 + PRIuFAST8 + PRIuFAST16 + PRIuFAST32 + PRIuFAST64 + PRIuMAX + PRIuPTR + PRIx8 + PRIx16 + PRIx32 + PRIx64 + PRIxLEAST8 + PRIxLEAST16 + PRIxLEAST32 + PRIxLEAST64 + PRIxFAST8 + PRIxFAST16 + PRIxFAST32 + PRIxFAST64 + PRIxMAX + PRIxPTR + PRIX8 + PRIX16 + PRIX32 + PRIX64 + PRIXLEAST8 + PRIXLEAST16 + PRIXLEAST32 + PRIXLEAST64 + PRIXFAST8 + PRIXFAST16 + PRIXFAST32 + PRIXFAST64 + PRIXMAX + PRIXPTR + // The fscanf macros for signed integers + SCNd8 + SCNd16 + SCNd32 + SCNd64 + SCNdLEAST8 + SCNdLEAST16 + SCNdLEAST32 + SCNdLEAST64 + SCNdFAST8 + SCNdFAST16 + SCNdFAST32 + SCNdFAST64 + SCNdMAX + SCNdPTR + SCNi8 + SCNi16 + SCNi32 + SCNi64 + SCNiLEAST8 + SCNiLEAST16 + SCNiLEAST32 + SCNiLEAST64 + SCNiFAST8 + SCNiFAST16 + SCNiFAST32 + SCNiFAST64 + SCNiMAX + SCNiPTR + // The fscanf macros for unsigned integers + SCNo8 + SCNo16 + SCNo32 + SCNo64 + SCNoLEAST8 + SCNoLEAST16 + SCNoLEAST32 + SCNoLEAST64 + SCNoFAST8 + SCNoFAST16 + SCNoFAST32 + SCNoFAST64 + SCNoMAX + SCNoPTR + SCNu8 + SCNu16 + SCNu32 + SCNu64 + SCNuLEAST8 + SCNuLEAST16 + SCNuLEAST32 + SCNuLEAST64 + SCNuFAST8 + SCNuFAST16 + SCNuFAST32 + SCNuFAST64 + SCNuMAX + SCNuPTR + SCNx8 + SCNx16 + SCNx32 + SCNx64 + SCNxLEAST8 + SCNxLEAST16 + SCNxLEAST32 + SCNxLEAST64 + SCNxFAST8 + SCNxFAST16 + SCNxFAST32 + SCNxFAST64 + SCNxMAX + SCNxPTR + // Functions for greatest-width integer types + intmax_t imaxabs(intmax_t j); + imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom); + intmax_t strtoimax(const char * restrict nptr, char ** restrict endptr, int base); + uintmax_t strtoumax(const char * restrict nptr, char ** restrict endptr, int base); + intmax_t wcstoimax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + uintmax_t wcstoumax(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); +} + +#include +{ // Alternative spellings + and && + and_eq &= + bitand & + bitor | + compl ~ + not ! + not_eq != + or || + or_eq |= + xor ^ + xor_eq ^= +} + +#include +{ // Sizes of integer types + CHAR_BIT + SCHAR_MIN + SCHAR_MAX + UCHAR_MAX + CHAR_MIN + CHAR_MAX + MB_LEN_MAX + SHRT_MIN + SHRT_MAX + USHRT_MAX + INT_MIN + INT_MAX + UINT_MAX + LONG_MIN + LONG_MAX + ULONG_MAX + LLONG_MIN + LLONG_MAX + ULLONG_MAX +} + +#include +{ // Localization + struct lconv; + NULL + LC_ALL + LC_COLLATE + LC_CTYPE + LC_MONETARY + LC_NUMERIC + LC_TIME + + char *setlocale(int category, const char *locale); + struct lconv *localeconv(void); +} + +#include +{ // Mathematics + float_t + double_t + HUGE_VAL + HUGE_VALF + HUGE_VALL + INFINITY + NAN + FP_INFINITE + FP_NAN + FP_NORMAL + FP_SUBNORMAL + FP_ZERO + FP_FAST_FMA + FP_FAST_FMAF + FP_FAST_FMAL + FP_FAST_FMAF + FP_FAST_FMAL + FP_ILOGB0 + FP_ILOGBNAN + MATH_ERRNO + MATH_ERREXCEPT + math_errhandling + #pragma STDC FP_CONTRACT on-off-switch + + // Classification macros + int fpclassify(real-floating x); + int isfinite(real-floating x); + int isinf(real-floating x); + int isnan(real-floating x); + int isnormal(real-floating x); + int signbit(real-floating x); + // Trigonometric functions + double acos(double x); + float acosf(float x); + long double acosl(long double x); + double asin(double x); + float asinf(float x); + long double asinl(long double x); + double atan(double x); + float atanf(float x); + long double atanl(long double x); + double atan2(double y, double x); + float atan2f(float y, float x); + long double atan2l(long double y, long double x); + double cos(double x); + float cosf(float x); + long double cosl(long double x); + double sin(double x); + float sinf(float x); + long double sinl(long double x); + double tan(double x); + float tanf(float x); + long double tanl(long double x); + // Hyperbolic functions + double acosh(double x); + float acoshf(float x); + long double acoshl(long double x); + double asinh(double x); + float asinhf(float x); + long double asinhl(long double x); + double atanh(double x); + float atanhf(float x); + long double atanhl(long double x); + double cosh(double x); + float coshf(float x); + long double coshl(long double x); + double sinh(double x); + float sinhf(float x); + long double sinhl(long double x); + double tanh(double x); + float tanhf(float x); + long double tanhl(long double x); + // Exponential and logarithmic functions + double exp(double x); + float expf(float x); + long double expl(long double x); + double exp2(double x); + float exp2f(float x); + long double exp2l(long double x); + double expm1(double x); + float expm1f(float x); + long double expm1l(long double x); + double frexp(double value, int *exp); + float frexpf(float value, int *exp); + long double frexpl(long double value, int *exp); + int ilogb(double x); + int ilogbf(float x); + int ilogbl(long double x); + double ldexp(double x, int exp); + float ldexpf(float x, int exp); + long double ldexpl(long double x, int exp); + double log(double x); + float logf(float x); + long double logl(long double x); + double log10(double x); + float log10f(float x); + long double log10l(long double x); + double log1p(double x); + float log1pf(float x); + long double log1pl(long double x); + double log2(double x); + float log2f(float x); + long double log2l(long double x); + double logb(double x); + float logbf(float x); + long double logbl(long double x); + double modf(double value, double *iptr); + float modff(float value, float *iptr); + long double modfl(long double value, long double *iptr); + double scalbn(double x, int n); + float scalbnf(float x, int n); + long double scalbnl(long double x, int n); + double scalbln(double x, long int n); + float scalblnf(float x, long int n); + long double scalblnl(long double x, long int n); + // Power and absolute-value functions + double cbrt(double x); + float cbrtf(float x); + long double cbrtl(long double x); + double fabs(double x); + float fabsf(float x); + long double fabsl(long double x); + double hypot(double x, double y); + float hypotf(float x, float y); + long double hypotl(long double x, long double y); + double pow(double x, double y); + float powf(float x, float y); + long double powl(long double x, long double y); + double sqrt(double x); + float sqrtf(float x); + long double sqrtl(long double x); + // Error and gamma functions + double erfc(double x); + float erfcf(float x); + long double erfcl(long double x); + double lgamma(double x); + float lgammaf(float x); + long double lgammal(long double x); + double tgamma(double x); + float tgammaf(float x); + long double tgammal(long double x); + // Nearest integer functions + double ceil(double x); + float ceilf(float x); + long double ceill(long double x); + double floor(double x); + float floorf(float x); + long double floorl(long double x); + double nearbyint(double x); + float nearbyintf(float x); + long double nearbyintl(long double x); + double rint(double x); + float rintf(float x); + long double rintl(long double x); + long int lrint(double x); + long int lrintf(float x); + long int lrintl(long double x); + long long int llrint(double x); + long long int llrintf(float x); + long long int llrintl(long double x); + double round(double x); + float roundf(float x); + long double roundl(long double x); + long int lround(double x); + long int lroundf(float x); + long int lroundl(long double x); + long long int llround(double x); + long long int llroundf(float x); + long long int llroundl(long double x); + double trunc(double x); + float truncf(float x); + long double truncl(long double x); + // Remainder functions + double fmod(double x, double y); + float fmodf(float x, float y); + long double fmodl(long double x, long double y); + double remainder(double x, double y); + float remainderf(float x, float y); + long double remainderl(long double x, long double y); + double remquo(double x, double y, int *quo); + float remquof(float x, float y, int *quo); + long double remquol(long double x, long double y, int *quo); + // Manipulation functions + double copysign(double x, double y); + float copysignf(float x, float y); + long double copysignl(long double x, long double y); + double nan(const char *tagp); + float nanf(const char *tagp); + long double nanl(const char *tagp); + double nextafter(double x, double y); + float nextafterf(float x, float y); + long double nextafterl(long double x, long double y); + double nexttoward(double x, long double y); + float nexttowardf(float x, long double y); + long double nexttowardl(long double x, long double y); + // Maximum, minimum, and positive difference functions + double fdim(double x, double y); + float fdimf(float x, float y); + long double fdiml(long double x, long double y); + double fmax(double x, double y); + float fmaxf(float x, float y); + long double fmaxl(long double x, long double y); + double fmin(double x, double y); + float fminf(float x, float y); + long double fminl(long double x, long double y); + // Floating multiply-add + double fma(double x, double y, double z); + float fmaf(float x, float y, float z); + long double fmal(long double x, long double y, long double z); + // Comparison macros + int isgreater(real-floating x, real-floating y); + int isgreaterequal(real-floating x, real-floating y); + int isless(real-floating x, real-floating y); + int islessequal(real-floating x, real-floating y); + int islessgreater(real-floating x, real-floating y); + int isunordered(real-floating x, real-floating y); +} + +#include +{ // Nonlocal jumps + jmp_buf + + int setjmp(jmp_buf env); + _Noreturn void longjmp(jmp_buf env, int val); +} + +#include +{ // Signal handling + sig_atomic_t + SIG_DFL + SIG_ERR + SIG_IGN + SIGABRT + SIGFPE + SIGILL + SIGINT + SIGSEGV + SIGTERM + + void (*signal(int sig, void (*func)(int)))(int); + int raise(int sig); +} + +#include +{ // Alignment + alignas + _Alignof +} + +#include +{ // Variable arguments + va_list + + type va_arg(va_list ap, type); + void va_copy(va_list dest, va_list src); + void va_end(va_list ap); + void va_start(va_list ap, parmN); +} + +#include +{ // Atomics + ATOMIC_BOOL_LOCK_FREE + ATOMIC_CHAR_LOCK_FREE + ATOMIC_CHAR16_T_LOCK_FREE + ATOMIC_CHAR32_T_LOCK_FREE + ATOMIC_WCHAR_T_LOCK_FREE + ATOMIC_SHORT_LOCK_FREE + ATOMIC_INT_LOCK_FREE + ATOMIC_LONG_LOCK_FREE + ATOMIC_LLONG_LOCK_FREE + ATOMIC_POINTER_LOCK_FREE + + ATOMIC_FLAG_INIT + memory_order + atomic_flag + + // Initialization + #define ATOMIC_VAR_INIT(C value) + void atomic_init(volatile A *obj, C value); + // Order and consistency + memory_order_relaxed + memory_order_consume + memory_order_acquire + memory_order_release + memory_order_acq_rel + memory_order_seq_cst + type kill_dependency(type y); + // Fences + void atomic_thread_fence(memory_order order); + void atomic_signal_fence(memory_order order); + // Lock-free property + _Bool atomic_is_lock_free(const volatile A *obj); + // Atomic integer types + atomic_bool + atomic_char + atomic_schar + atomic_uchar + atomic_short + atomic_ushort + atomic_int + atomic_uint + atomic_long + atomic_ulong + atomic_llong + atomic_ullong + atomic_char16_t + atomic_char32_t + atomic_wchar_t + atomic_int_least8_t + atomic_uint_least8_t + atomic_int_least16_t + atomic_uint_least16_t + atomic_int_least32_t + atomic_uint_least32_t + atomic_int_least64_t + atomic_uint_least64_t + atomic_int_fast8_t + atomic_uint_fast8_t + atomic_int_fast16_t + atomic_uint_fast16_t + atomic_int_fast32_t + atomic_uint_fast32_t + atomic_int_fast64_t + atomic_uint_fast64_t + atomic_intptr_t + atomic_uintptr_t + atomic_size_t + atomic_ptrdiff_t + atomic_intmax_t + atomic_uintmax_t + // Operations on atomic types + void atomic_store(volatile A *object, C desired); + void atomic_store_explicit(volatile A *object, C desired, memory_order order); + C atomic_load(volatile A *object); + C atomic_load_explicit(volatile A *object, memory_order order); + C atomic_exchange(volatile A *object, C desired); + C atomic_exchange_explicit(volatile A *object, C desired, memory_order order); + _Bool atomic_compare_exchange_strong(volatile A *object, C *expected, C desired); + _Bool atomic_compare_exchange_strong_explicit(volatile A *object, C *expected, C desired, memory_order success, memory_order failure); + _Bool atomic_compare_exchange_weak(volatile A *object, C *expected, C desired); + _Bool atomic_compare_exchange_weak_explicit(volatile A *object, C *expected, C desired, memory_order success, memory_order failure); + C atomic_fetch_add(volatile A *object, M operand); + C atomic_fetch_add_explicit(volatile A *object, M operand, memory_order order); + C atomic_fetch_sub(volatile A *object, M operand); + C atomic_fetch_sub_explicit(volatile A *object, M operand, memory_order order); + C atomic_fetch_or(volatile A *object, M operand); + C atomic_fetch_or_explicit(volatile A *object, M operand, memory_order order); + C atomic_fetch_xor(volatile A *object, M operand); + C atomic_fetch_xor_explicit(volatile A *object, M operand, memory_order order); + C atomic_fetch_and(volatile A *object, M operand); + C atomic_fetch_and_explicit(volatile A *object, M operand, memory_order order); + // Atomic flag type and operations + atomic_flag guard = ATOMIC_FLAG_INIT; + _Bool atomic_flag_test_and_set(volatile atomic_flag *object); + _Bool atomic_flag_test_and_set_explicit(volatile atomic_flag *object, memory_order order); + void atomic_flag_clear(volatile atomic_flag *object); + void atomic_flag_clear_explicit(volatile atomic_flag *object, memory_order order); +} + +#include +{ // Boolean type and values + bool + _Bool + true + false +} + +#include +{ // Common definitions + ptrdiff_t + size_t + max_align_t + wchar_t + NULL + offsetof(type, member-designator) +} + +#include +{ // Integer types + int8_t + int16_t + int32_t + int64_t + uint8_t + uint16_t + uint32_t + uint64_t + int_least8_t + int_least16_t + int_least32_t + int_least64_t + uint_least8_t + uint_least16_t + uint_least32_t + uint_least64_t + int_fast8_t + int_fast16_t + int_fast32_t + int_fast64_t + uint_fast8_t + uint_fast16_t + uint_fast32_t + uint_fast64_t + intptr_t + uintptr_t + intmax_t + uintmax_t + INT8_MIN + INT16_MIN + INT32_MIN + INT64_MIN + INT8_MAX + INT16_MAX + INT32_MAX + INT64_MAX + UINT8_MAX + UINT16_MAX + UINT32_MAX + UINT64_MAX + INT_FAST8_MIN + INT_FAST16_MIN + INT_FAST32_MIN + INT_FAST64_MIN + INT_FAST8_MAX + INT_FAST16_MAX + INT_FAST32_MAX + INT_FAST64_MAX + UINT_FAST8_MAX + UINT_FAST16_MAX + UINT_FAST32_MAX + UINT_FAST64_MAX + INTPTR_MIN + INTPTR_MAX + UINTPTR_MAX + INTMAX_MIN + INTMAX_MAX + UINTMAX_MAX + PTRDIFF_MIN + PTRDIFF_MAX + SIG_ATOMIC_MIN + SIG_ATOMIC_MAX + SIZE_MAX + WCHAR_MIN + WCHAR_MAX + WINT_MIN + WINT_MAX + INT8_C(value) + INT16_C(value) + INT32_C(value) + INT64_C(value) + UINT8_C(value) + UINT16_C(value) + UINT32_C(value) + UINT64_C(value) + INTMAX_C(value) + UINTMAX_C(value) +} + +#include +{ // Input/output + FILE + fpos_t + + _IOFBF + _IOLBF + _IONBF + BUFSIZ + EOF + FOPEN_MAX + FILENAME_MAX + L_tmpnam + SEEK_CUR + SEEK_END + SEEK_SET + TMP_MAX + stderr + stdin + stdout + // Operations on files + int remove(const char *filename); + int rename(const char *old, const char *new); + FILE *tmpfile(void); + char *tmpnam(char *s); + int fclose(FILE *stream); + int fflush(FILE *stream); + FILE *fopen(const char * restrict filename, const char * restrict mode); + FILE *freopen(const char * restrict filename, const char * restrict mode, FILE * restrict stream); + void setbuf(FILE * restrict stream, char * restrict buf); + int setvbuf(FILE * restrict stream, char * restrict buf, int mode, size_t size); + // Formatted input/output functions + int fprintf(FILE * restrict stream, const char * restrict format, ...); + int fscanf(FILE * restrict stream, const char * restrict format, ...); + int printf(const char * restrict format, ...); + int scanf(const char * restrict format, ...); + int snprintf(char * restrict s, size_t n, const char * restrict format, ...); + int sprintf(char * restrict s, const char * restrict format, ...); + int sscanf(const char * restrict s, const char * restrict format, ...); + int vfprintf(FILE * restrict stream, const char * restrict format, va_list arg); + int vfscanf(FILE * restrict stream, const char * restrict format, va_list arg); + int vprintf(const char * restrict format, va_list arg); + int vscanf(const char * restrict format, va_list arg); + int vsnprintf(char * restrict s, size_t n, const char * restrict format, va_list arg); + int vsprintf(char * restrict s, const char * restrict format, va_list arg); + int vsscanf(const char * restrict s, const char * restrict format, va_list arg); + // Character input/output functions + int fgetc(FILE *stream); + char *fgets(char * restrict s, int n, FILE * restrict stream); + int fputc(int c, FILE *stream); + int fputs(const char * restrict s, FILE * restrict stream); + int getc(FILE *stream); + int getchar(void); + int putc(int c, FILE *stream); + int putchar(int c); + int puts(const char *s); + int ungetc(int c, FILE *stream); + // Direct input/output functions + size_t fread(void * restrict ptr, size_t size, size_t nmemb, FILE * restrict stream); + size_t fwrite(const void * restrict ptr, size_t size, size_t nmemb, FILE * restrict stream); + // File positioning functions + int fgetpos(FILE * restrict stream, fpos_t * restrict pos); + int fseek(FILE *stream, long int offset, int whence); + int fsetpos(FILE *stream, const fpos_t *pos); + long int ftell(FILE *stream); + void rewind(FILE *stream); + // Error-handling functions + void clearerr(FILE *stream); + int feof(FILE *stream); + int ferror(FILE *stream); + void perror(const char *s); +} + +#include +{ // General utilities + div_t + ldiv_t + lldiv_t + EXIT_FAILURE + EXIT_SUCCESS + RAND_MAX + MB_CUR_MAX + // Numeric conversion functions + double atof(const char *nptr); + int atoi(const char *nptr); + long int atol(const char *nptr); + long long int atoll(const char *nptr); + double strtod(const char * restrict nptr, char ** restrict endptr); + float strtof(const char * restrict nptr, char ** restrict endptr); + long double strtold(const char * restrict nptr, char ** restrict endptr); + long int strtol(const char * restrict nptr, char ** restrict endptr, int base); + long long int strtoll(const char * restrict nptr, char ** restrict endptr, int base); + unsigned long int strtoul(const char * restrict nptr, char ** restrict endptr, int base); + unsigned long long int strtoull(const char * restrict nptr, char ** restrict endptr, int base); + // Pseudo-random sequence generation functions + int rand(void); + void srand(unsigned int seed); + // Memory management functions + void *aligned_alloc(size_t alignment, size_t size) + void *calloc(size_t nmemb, size_t size); + void free(void *ptr); + void *malloc(size_t size); + void *realloc(void *ptr, size_t size); + // Communication with the environment + _Noreturn void abort(void); + int atexit(void (*func)(void)); + int at_quick_exit(void (*func)(void)); + _Noreturn void exit(int status); + _Noreturn void _Exit(int status); + char *getenv(const char *name); + _Noreturn void quick_exit(int status); + int system(const char *string); + // Searching and sorting utilities + void *bsearch(const void *key, const void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); + void qsort(void *base, size_t nmemb, size_t size, int (*compar)(const void *, const void *)); + // Integer arithmetic functions + int abs(int j); + long int labs(long int j); + long long int llabs(long long int j); + div_t div(int numer, int denom); + ldiv_t ldiv(long int numer, long int denom); + lldiv_t lldiv(long long int numer, long long int denom); + // Multibyte/wide character conversion functions + int mblen(const char *s, size_t n); + int mbtowc(wchar_t * restrict pwc, const char * restrict s, size_t n); + int wctomb(char *s, wchar_t wc); + // Multibyte/wide string conversion functions + size_t mbstowcs(wchar_t * restrict pwcs, const char * restrict s, size_t n); + size_t wcstombs(char * restrict s, const wchar_t * restrict pwcs, size_t n); +} + +#include +{ // _Noreturn + noreturn + _Noreturn +} + +#include +{ // String handling + void *memcpy(void * restrict s1, const void * restrict s2, size_t n); + void *memmove(void *s1, const void *s2, size_t n); + char *strcpy(char * restrict s1, const char * restrict s2); + char *strncpy(char * restrict s1, const char * restrict s2, size_t n); + // Concatenation functions + char *strcat(char * restrict s1, const char * restrict s2); + char *strncat(char * restrict s1, const char * restrict s2, size_t n); + // Comparison functions + int memcmp(const void *s1, const void *s2, size_t n); + int strcmp(const char *s1, const char *s2); + int strcoll(const char *s1, const char *s2); + int strncmp(const char *s1, const char *s2, size_t n); + size_t strxfrm(char * restrict s1, const char * restrict s2, size_t n); + // Search functions + void *memchr(const void *s, int c, size_t n); + char *strchr(const char *s, int c); + size_t strcspn(const char *s1, const char *s2); + char *strpbrk(const char *s1, const char *s2); + char *strrchr(const char *s, int c); + size_t strspn(const char *s1, const char *s2); + char *strstr(const char *s1, const char *s2); + char *strtok(char * restrict s1, const char * restrict s2); + // Miscellaneous functions + void *memset(void *s, int c, size_t n); + char *strerror(int errnum); + size_t strlen(const char *s); +} + +#include +// Type-generic math + +#include +{ // Threads + thread_local + _Thread_local + ONCE_FLAG_INIT + TSS_DTOR_ITERATIONS + + cnd_t + thrd_t + tss_t + mtx_t + tss_dtor_t + thrd_start_t + once_flag + + mtx_plain + mtx_recursive + mtx_timed + thrd_timedout + thrd_success + thrd_busy + thrd_error + thrd_nomem + + // Initialization functions + void call_once(once_flag *flag, void (*func)(void)); + // Condition variable functions + int cnd_broadcast(cnd_t *cond); + void cnd_destroy(cnd_t *cond); + int cnd_init(cnd_t *cond); + int cnd_signal(cnd_t *cond); + int cnd_timedwait(cnd_t *restrict cond, mtx_t *restrict mtx, const struct timespec *restrict ts); + int cnd_wait(cnd_t *cond, mtx_t *mtx); + // Mutex functions + void mtx_destroy(mtx_t *mtx); + int mtx_init(mtx_t *mtx, int type); + int mtx_lock(mtx_t *mtx); + int mtx_timedlock(mtx_t *restrict mtx, const struct timespec *restrict ts); + int mtx_trylock(mtx_t *mtx); + int mtx_unlock(mtx_t *mtx); + // Thread functions + int thrd_create(thrd_t *thr, thrd_start_t func, void *arg); + thrd_t thrd_current(void); + int thrd_detach(thrd_t thr); + int thrd_equal(thrd_t thr0, thrd_t thr1); + _Noreturn void thrd_exit(int res); + int thrd_join(thrd_t thr, int *res); + int thrd_sleep(const struct timespec *duration, struct timespec *remaining); + void thrd_yield(void); + // Thread-specific storage functions + int tss_create(tss_t *key, tss_dtor_t dtor); + void tss_delete(tss_t key); + void *tss_get(tss_t key); + int tss_set(tss_t key, void *val); +} + +#include +{ // Date and time + CLOCKS_PER_SEC + TIME_UTC + clock_t + time_t + struct timespec; + struct tm; + + // Time manipulation functions + clock_t clock(void); + double difftime(time_t time1, time_t time0); + time_t mktime(struct tm *timeptr); + time_t time(time_t *timer); + int timespec_get(struct timespec *ts, int base); + // Time conversion functions + char *asctime(const struct tm *timeptr); + char *ctime(const time_t *timer); + struct tm *gmtime(const time_t *timer); + struct tm *localtime(const time_t *timer); + size_t strftime(char * restrict s, size_t maxsize, const char * restrict format, const struct tm * restrict timeptr); +} + +#include +{ // Unicode utilities + char16_t + char32_t + + size_t mbrtoc16(char16_t * restrict pc16, const char * restrict s, size_t n, mbstate_t * restrict ps); + size_t c16rtomb(char * restrict s, char16_t c16, mbstate_t * restrict ps); + size_t mbrtoc32(char32_t * restrict pc32, const char * restrict s, size_t n, mbstate_t * restrict ps); + size_t c32rtomb(char * restrict s, char32_t c32, mbstate_t * restrict ps); +} + +#include +{ // Extended multibyte and wide character utilities + mbstate_t + wint_t + WCHAR_MIN + WCHAR_MAX + WEOF + + // Formatted wide character input/output functions + int fwprintf(FILE * restrict stream, const wchar_t * restrict format, ...); + int fwscanf(FILE * restrict stream, const wchar_t * restrict format, ...); + int swprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, ...); + int swscanf(const wchar_t * restrict s, const wchar_t * restrict format, ...); + int vfwprintf(FILE * restrict stream, const wchar_t * restrict format, va_list arg); + int vfwscanf(FILE * restrict stream, const wchar_t * restrict format, va_list arg); + int vswprintf(wchar_t * restrict s, size_t n, const wchar_t * restrict format, va_list arg); + int vswscanf(const wchar_t * restrict s, const wchar_t * restrict format, va_list arg); + int vwprintf(const wchar_t * restrict format, va_list arg); + int vwscanf(const wchar_t * restrict format, va_list arg); + int wprintf(const wchar_t * restrict format, ...); + int wscanf(const wchar_t * restrict format, ...); + // Wide character input/output functions + wint_t fgetwc(FILE *stream); + wchar_t *fgetws(wchar_t * restrict s, int n, FILE * restrict stream); + wint_t fputwc(wchar_t c, FILE *stream); + int fputws(const wchar_t * restrict s, FILE * restrict stream); + int fwide(FILE *stream, int mode); + wint_t getwc(FILE *stream); + wint_t getwchar(void); + wint_t putwc(wchar_t c, FILE *stream); + wint_t putwchar(wchar_t c); + wint_t ungetwc(wint_t c, FILE *stream); + // General wide string utilities + double wcstod(const wchar_t * restrict nptr, wchar_t ** restrict endptr); + float wcstof(const wchar_t * restrict nptr, wchar_t ** restrict endptr); + long double wcstold(const wchar_t * restrict nptr, wchar_t ** restrict endptr); + long int wcstol(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + long long int wcstoll(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + unsigned long int wcstoul(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + unsigned long long int wcstoull(const wchar_t * restrict nptr, wchar_t ** restrict endptr, int base); + wchar_t *wcscpy(wchar_t * restrict s1, const wchar_t * restrict s2); + wchar_t *wcsncpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); + wchar_t *wmemcpy(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); + wchar_t *wmemmove(wchar_t *s1, const wchar_t *s2, size_t n); + wchar_t *wcscat(wchar_t * restrict s1, const wchar_t * restrict s2); + wchar_t *wcsncat(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); + int wcscmp(const wchar_t *s1, const wchar_t *s2); + int wcscoll(const wchar_t *s1, const wchar_t *s2); + int wcsncmp(const wchar_t *s1, const wchar_t *s2, size_t n); + size_t wcsxfrm(wchar_t * restrict s1, const wchar_t * restrict s2, size_t n); + int wmemcmp(const wchar_t *s1, const wchar_t *s2, size_t n); + wchar_t *wcschr(const wchar_t *s, wchar_t c); + size_t wcscspn(const wchar_t *s1, const wchar_t *s2); + wchar_t *wcspbrk(const wchar_t *s1, const wchar_t *s2); + wchar_t *wcsrchr(const wchar_t *s, wchar_t c); + size_t wcsspn(const wchar_t *s1, const wchar_t *s2); + wchar_t *wcsstr(const wchar_t *s1, const wchar_t *s2); + wchar_t *wcstok(wchar_t * restrict s1, const wchar_t * restrict s2, wchar_t ** restrict ptr); + wchar_t *wmemchr(const wchar_t *s, wchar_t c, size_t n); + size_t wcslen(const wchar_t *s); + wchar_t *wmemset(wchar_t *s, wchar_t c, size_t n); + // Wide character time conversion functions + size_t wcsftime(wchar_t * restrict s, size_t maxsize, const wchar_t * restrict format, const struct tm * restrict timeptr); + // Extended multibyte/wide character conversion utilities + wint_t btowc(int c); + int wctob(wint_t c); + int mbsinit(const mbstate_t *ps); + size_t mbrlen(const char * restrict s, size_t n, mbstate_t * restrict ps); + size_t mbrtowc(wchar_t * restrict pwc, const char * restrict s, size_t n, mbstate_t * restrict ps); + size_t wcrtomb(char * restrict s, wchar_t wc, mbstate_t * restrict ps); + size_t mbsrtowcs(wchar_t * restrict dst, const char ** restrict src, size_t len, mbstate_t * restrict ps); + size_t wcsrtombs(char * restrict dst, const wchar_t ** restrict src, size_t len, mbstate_t * restrict ps); +} + +#include +{ //Wide character classification functions + wctrans_t + wctype_t + + int iswalnum(wint_t wc); + int iswalpha(wint_t wc); + int iswblank(wint_t wc); + int iswcntrl(wint_t wc); + int iswdigit(wint_t wc); + int iswgraph(wint_t wc); + int iswlower(wint_t wc); + int iswprint(wint_t wc); + int iswpunct(wint_t wc); + int iswspace(wint_t wc); + int iswupper(wint_t wc); + int iswxdigit(wint_t wc); + int iswctype(wint_t wc, wctype_t desc); + wctype_t wctype(const char *property); + // Wide character case mapping utilities + wint_t towlower(wint_t wc); + wint_t towupper(wint_t wc); + wint_t towctrans(wint_t wc, wctrans_t desc); + wctrans_t wctrans(const char *property); +} diff --git a/Build/tools/lang/Hive.hsql b/Build/tools/lang/Hive.hsql new file mode 100644 index 000000000..3e9d4cf63 --- /dev/null +++ b/Build/tools/lang/Hive.hsql @@ -0,0 +1,2 @@ +-- http://hive.apache.org/ +-- https://cwiki.apache.org/confluence/display/Hive/LanguageManual diff --git a/Build/tools/lang/JavaScript.js b/Build/tools/lang/JavaScript.js new file mode 100644 index 000000000..485572e29 --- /dev/null +++ b/Build/tools/lang/JavaScript.js @@ -0,0 +1,578 @@ +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Lexical_grammar +// https://www.ecma-international.org/publications/standards/Ecma-262.htm + +async await +break +case catch class const continue +debugger default delete do +else export extends +finally for function +if import in instanceof +new +return +super switch +this throw try typeof +var void +while with +yield +let +static +enum +implements interface package private protected public + +Infinity +NaN +undefined + +// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-imports +// https://www.ecma-international.org/ecma-262/9.0/index.html#sec-exports +import as from; +export as; +export default; + +eval(x) +isFinite(number) +isNaN(number) +parseFloat(string) +parseInt(string, radix) +decodeURI(encodedURI) +decodeURIComponent(encodedURIComponent) +encodeURI(uri) +encodeURIComponent(uriComponent) +escape(string) +unescape(string) + +Object([value]) { + assign(target, ...sources) + create(O, Properties) + defineProperties(O, Properties) + defineProperty(O, P, Attributes) + entries(O) + freeze(O) + getOwnPropertyDescriptor(O, P) + getOwnPropertyDescriptors(O) + getOwnPropertyNames(O) + getOwnPropertySymbols(O) + getPrototypeOf(O) + is(value1, value2) + isExtensible(O) + isFrozen(O) + isSealed(O) + keys(O) + preventExtensions(O) + seal(O) + setPrototypeOf(O, proto) + values(O) + prototype + constructor + hasOwnProperty(V) + isPrototypeOf(V) + propertyIsEnumerable(V) + toLocaleString([reserved1 [, reserved2]]) + toString() + valueOf() + + __proto__ + __defineGetter__(P, getter) + __defineSetter__(P, setter) + __lookupGetter__(P) + __lookupSetter__(P) +} + +Function(p1, p2, … , pn, body) { + length + name + prototype + apply(thisArg, argArray) + bind(thisArg, ...args) + call(thisArg, ...args) + toString() +} + +Boolean(value) + +Symbol([description]) { + asyncIterator + hasInstance + isConcatSpreadable + iterator + match + replace + search + species + split + toPrimitive + toStringTag + unscopables + prototype + for(key) + keyFor(sym) +} + +Error(message) { + message + name + + EvalError + RangeError + ReferenceError + SyntaxError + TypeError + URIError + NativeError +} + +Number(value) { + EPSILON + MAX_SAFE_INTEGER + MAX_VALUE + MIN_SAFE_INTEGER + MIN_VALUE + NaN + NEGATIVE_INFINITY + POSITIVE_INFINITY + + isFinite(number) + isInteger(number) + isNaN(number) + isSafeInteger(number) + parseFloat(string) + parseInt(string, radix) + prototype + toExponential(fractionDigits) + toFixed(fractionDigits) + toPrecision(precision) +} + +Math { + E + LN10 + LN2 + LOG10E + LOG2E + PI + SQRT1_2 + SQRT2 + toStringTag + + abs(x) + acos(x) + acosh(x) + asin(x) + asinh(x) + atan(x) + atanh(x) + atan2(y, x) + cbrt(x) + ceil(x) + clz32(x) + cos(x) + cosh(x) + exp(x) + expm1(x) + floor(x) + fround(x) + hypot(value1, value2, ...values) + imul(x, y) + log(x) + log1p(x) + log10(x) + log2(x) + max(value1, value2, ...values) + min(value1, value2, ...values) + pow(base, exponent) + random() + round(x) + sin(x) + sinh(x) + sqrt(x) + tan(x) + tanh(x) + trunc(x) +} + +Date(year, month [, date [, hours [, minutes [, seconds [, ms]]]]]) { + Date(value) + Date() + UTC(year [, month [, date [, hours [, minutes [, seconds [, ms]]]]]]) + now() + parse(string) + prototype + getDate() + getDay() + getFullYear() + getHours() + getMilliseconds() + getMinutes() + getMonth() + getSeconds() + getTime() + getTimezoneOffset() + getUTCDate() + getUTCDay() + getUTCFullYear() + getUTCHours() + getUTCMilliseconds() + getUTCMinutes() + getUTCMonth() + getUTCSeconds() + setDate(date) + setFullYear(year [, month [, date]]) + setHours(hour [, min [, sec [, ms]]]) + setMilliseconds(ms) + setMinutes(min [, sec [, ms]]) + setMonth(month [, date]) + setSeconds(sec [, ms]) + setTime(time) + setUTCDate(date) + setUTCFullYear(year [, month [, date]]) + setUTCHours(hour [, min [, sec [, ms]]]) + setUTCMilliseconds(ms) + setUTCMinutes(min [, sec [, ms]]) + setUTCMonth(month [, date]) + setUTCSeconds(sec [, ms]) + toDateString() + toISOString() + toJSON(key) + toLocaleDateString([reserved1 [, reserved2]]) + toLocaleTimeString([reserved1 [, reserved2]]) + toTimeString() + toUTCString() + + getYear() + setYear(year) + toGMTString() +} + +String(value) { + fromCharCode(...codeUnits) + fromCodePoint(...codePoints) + raw(template, ...substitutions) + length + prototype + charAt(pos) + charCodeAt(pos) + codePointAt(pos) + concat(...args) + endsWith(searchString [, endPosition]) + includes(searchString [, position]) + indexOf(searchString [, position]) + lastIndexOf(searchString [, position]) + localeCompare(that [, reserved1 [, reserved2]]) + match(regexp) + normalize([form]) + padEnd(maxLength [, fillString]) + padStart(maxLength [, fillString]) + repeat(count) + replace(searchValue, replaceValue) + search(regexp) + slice(start, end) + split(separator, limit) + startsWith(searchString [, position]) + substring(start, end) + toLocaleLowerCase([reserved1 [, reserved2]]) + toLocaleUpperCase([reserved1 [, reserved2]]) + toLowerCase() + toUpperCase() + trim() + iterator + next() + + substr(start, length) + anchor(name) + big() + blink() + bold() + fixed() + fontcolor(color) + fontsize(size) + italics() + link(url) + small() + strike() + sub() + sup() + +} + +RegExp(pattern, flags) { + compile(pattern, flags) + lastIndex + prototype + exec(string) + test(S) + dotAll + flags + global + ignoreCase + multiline + sticky + source + unicode +} + +Array(...items) { + Array(len) + Array() + from(items [, mapfn [, thisArg]]) + isArray(arg) + of(...items) + length + prototype + concat(...arguments) + copyWithin(target, start [, end]) + entries() + every(callbackfn [, thisArg]) + fill(value [, start [, end]]) + filter(callbackfn [, thisArg]) + find(predicate [, thisArg]) + findIndex(predicate [, thisArg]) + forEach(callbackfn [, thisArg]) + includes(searchElement [, fromIndex]) + indexOf(searchElement [, fromIndex]) + join(separator) + keys() + lastIndexOf(searchElement [, fromIndex]) + map(callbackfn [, thisArg]) + pop() + push(...items) + reduce(callbackfn [, initialValue]) + reduceRight(callbackfn [, initialValue]) + reverse() + shift() + slice(start, end) + some(callbackfn [, thisArg]) + sort(comparefn) + splice(start, deleteCount, ...items) + unshift(...items) + values() + iterator + unscopables + + TypedArray + Int8Array + Uint8Array + Uint8ClampedArray + Int16Array + Uint16Array + Int32Array + Uint32Array + Float32Array + Float64Array +} + +Map([iterable]) { + prototype + clear() + delete(key) + entries() + forEach(callbackfn [, thisArg]) + get(key) + has(key) + keys() + set(key, value) + values() + size + iterator + toStringTag +} + +Set([iterable]) { + prototype + add(value) + clear() + delete(value) + entries() + forEach(callbackfn [, thisArg]) + has(value) + keys() + values() + size +} + +WeakMap([iterable]) { + prototype + delete(key) + get(key) + has(key) + set(key, value) +} + +WeakSet([iterable]) { + prototype + add(value) + delete(value) + has(value) +} + +ArrayBuffer(length) { + isView(arg) + prototype + byteLength + slice(start, end) +} + +SharedArrayBuffer(length) { + prototype + byteLength + slice(start, end) +} + +DataView(buffer [, byteOffset [, byteLength]]) { + prototype + buffer + byteLength + byteOffset + getFloat32(byteOffset [, littleEndian]) + getFloat64(byteOffset [, littleEndian]) + getInt8(byteOffset) + getInt16(byteOffset [, littleEndian]) + getInt16(byteOffset [, littleEndian]) + getInt32(byteOffset [, littleEndian]) + getUint8(byteOffset) + getUint16(byteOffset [, littleEndian]) + getUint32(byteOffset [, littleEndian]) + setFloat32(byteOffset, value [, littleEndian]) + setFloat64(byteOffset, value [, littleEndian]) + setInt8(byteOffset, value) + setInt16(byteOffset, value [, littleEndian]) + setInt32(byteOffset, value [, littleEndian]) + setUint8(byteOffset, value) + setUint16(byteOffset, value [, littleEndian]) + setUint32(byteOffset, value [, littleEndian]) +} + +Atomics { + add(typedArray, index, value) + and(typedArray, index, value) + compareExchange(typedArray, index, expectedValue, replacementValue) + exchange(typedArray, index, value) + isLockFree(size) + load(typedArray, index) + or(typedArray, index, value) + store(typedArray, index, value) + sub(typedArray, index, value) + wait(typedArray, index, value, timeout) + wake(typedArray, index, count) + xor(typedArray, index, value) +} + +JSON { + parse(text [, reviver]) + stringify(value [, replacer [, space]]) +} + +Generator { + prototype + next(value) + return(value) + throw(exception) +} + +Promise(executor) { + all(iterable) + race(iterable) + reject(r) + resolve(x) + prototype + catch(onRejected) + then(onFulfilled, onRejected) +} + +AsyncFunction(p1, p2, … , pn, body) { +} + +Reflect { + apply(target, thisArgument, argumentsList) + construct(target, argumentsList [, newTarget]) + defineProperty(target, propertyKey, attributes) + deleteProperty(target, propertyKey) + get(target, propertyKey [, receiver]) + getOwnPropertyDescriptor(target, propertyKey) + getPrototypeOf(target) + has(target, propertyKey) + isExtensible(target) + ownKeys(target) + preventExtensions(target) + set(target, propertyKey, V [, receiver]) + setPrototypeOf(target, proto) +} + +Proxy(target, handler) { + revocable(target, handler) +} + +// https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest +// https://xhr.spec.whatwg.org/ +XMLHttpRequest() { + UNSENT + OPENED + HEADERS_RECEIVED + LOADING + DONE + + onreadystatechange + readyState + response + responseText + responseType + responseURL + responseXML + status + statusText + timeout + upload + withCredentials + abort() + getAllResponseHeaders() + getResponseHeader(headerName) + open(method, url [, async [, user[, password]]]) + overrideMimeType(mimeType) + send(body) + setRequestHeader(header, value) +} + +// https://developer.mozilla.org/en-US/docs/Web/API/FormData +// https://xhr.spec.whatwg.org/#formdata +FormData([form]) { + append(name, value [, filename]) + delete(name) + delete(name) + get(name) + getAll(name) + has(name) + keys() + set(name, value [, filename]) + values() +} + +// https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope +WindowOrWorkerGlobalScope { + atob(encodedData) + btoa(stringToEncode) + clearInterval(intervalID) + clearTimeout(timeoutID) + createImageBitmap(image[, sx, sy, sw, sh[, options]]).then(function(response) { ... }) + Promise fetch(input[, init]) + setInterval(func, delay[, param1, param2, ...]) + setTimeout(function[, delay, param1, param2, ...]) +} + +// https://developer.mozilla.org/en-US/docs/Web/API/Storage +Storage { + length + clear() + getItem() + key() + removeItem() + setItem() + localStorage + sessionStorage +} + +// https://nodejs.org/api/globals.html +__dirname +__filename +exports +module +require(path) diff --git a/Build/tools/lang/MySQL.sql b/Build/tools/lang/MySQL.sql new file mode 100644 index 000000000..78cdc99db --- /dev/null +++ b/Build/tools/lang/MySQL.sql @@ -0,0 +1,1332 @@ +-- keywords +-- https://dev.mysql.com/doc/refman/8.0/en/keywords.html +-- https://dev.mysql.com/doc/refman/5.7/en/keywords.html +-- https://dev.mysql.com/doc/refman/5.6/en/keywords.html +-- https://dev.mysql.com/doc/refman/5.5/en/keywords.html +-- https://mariadb.com/kb/en/library/reserved-words/ +-- A +ACCESSIBLE (R) +ACCOUNT -- added in 5.7.6 (nonreserved) +ACTION +ACTIVE -- added in 8.0.14 (nonreserved) +ADD (R) +ADMIN -- became nonreserved in 8.0.12 +AFTER +AGAINST +AGGREGATE +ALGORITHM +ALL (R) +ALTER (R) +ALWAYS -- added in 5.7.6 (nonreserved) +ANALYSE -- added in 5.6.6 (nonreserved); removed in 8.0.1 +ANALYZE (R) +AND (R) +ANY +AS (R) +ASC (R) +ASCII +ASENSITIVE (R) +AT +AUTHORS -- removed in 5.6.8 +AUTOEXTEND_SIZE +AUTO_INCREMENT +AVG +AVG_ROW_LENGTH +-- B +BACKUP +BEFORE (R) +BEGIN +END +BETWEEN (R) +BIGINT (R) +BINARY (R) +BINLOG +BIT +BLOB (R) +BLOCK +BOOL +BOOLEAN +BOTH (R) +BTREE +BUCKETS -- added in 8.0.2 (nonreserved) +BY (R) +BYTE +-- C +CACHE +CALL (R) +CASCADE (R) +CASCADED +CASE (R) +END CASE; +CATALOG_NAME +CHAIN +CHANGE (R) +CHANGED +CHANNEL -- added in 5.7.6 (nonreserved) +CHAR (R) +CHARACTER (R) +CHARSET +CHECK (R) +CHECKSUM +CIPHER +CLASS_ORIGIN +CLIENT +CLONE -- added in 8.0.3 (nonreserved) +CLOSE +COALESCE +CODE +COLLATE (R) +COLLATION +COLUMN (R) +COLUMNS +COLUMN_FORMAT -- added in 5.6.6 (nonreserved) +COLUMN_NAME +COMMENT +COMMIT +COMMITTED +COMPACT +COMPLETION +COMPONENT +COMPRESSED +COMPRESSION -- added in 5.7.8 (nonreserved) +CONCURRENT +CONDITION (R) +CONNECTION +CONSISTENT +CONSTRAINT (R) +CONSTRAINT_CATALOG +CONSTRAINT_NAME +CONSTRAINT_SCHEMA +CONTAINS +CONTEXT +CONTINUE (R) +CONTRIBUTORS -- removed in 5.6.8 +CONVERT (R) +CPU +CREATE (R) +CROSS (R) +CUBE (R) -- became reserved in 8.0.1 +CUME_DIST (R) -- added in 8.0.2 (reserved) +CURRENT -- added in 5.6.4 (nonreserved) +CURRENT_DATE (R) +CURRENT_TIME (R) +CURRENT_TIMESTAMP (R) +CURRENT_USER (R) +CURSOR (R) +CURSOR_NAME +-- D +DATA +DATABASE (R) +DATABASES (R) +DATAFILE +DATE +DATETIME +DAY +DAY_HOUR (R) +DAY_MICROSECOND (R) +DAY_MINUTE (R) +DAY_SECOND (R) +DEALLOCATE +DEC (R) +DECIMAL (R) +DECLARE (R) +DEFAULT (R) +DEFAULT_AUTH -- added in 5.6.4 (nonreserved) +DEFINER +DEFINITION -- added in 8.0.11 (nonreserved) +DELAYED (R) +DELAY_KEY_WRITE +DELETE (R) +DENSE_RANK (R) -- added in 8.0.2 (reserved) +DESC (R) +DESCRIBE (R) +DESCRIPTION -- added in 8.0.11 (nonreserved) +DES_KEY_FILE -- removed in 8.0.3 +DETERMINISTIC (R) +DIAGNOSTICS -- added in 5.6.4 (nonreserved) +DIRECTORY +DISABLE +DISCARD +DISK +DISTINCT (R) +DISTINCTROW (R) +DIV (R) +DO +DOUBLE (R) +DROP (R) +DUAL (R) +DUMPFILE +DUPLICATE +DYNAMIC +-- E +EACH (R) +ELSE (R) +ELSEIF (R) +EMPTY (R) -- added in 8.0.4 (reserved) +ENABLE +ENCLOSED (R) +ENCRYPTION -- added in 5.7.11 (nonreserved) +END +ENDS +ENGINE +ENGINES +ENUM +ERROR -- added in 5.5.3 (nonreserved) +ERRORS +ESCAPE +ESCAPED (R) +EVENT +EVENTS +EVERY +EXCEPT (M) -- Added in MariaDB 10.3.0 +EXCHANGE +EXCLUDE -- added in 8.0.2 (nonreserved) +EXECUTE +EXISTS (R) +EXIT (R) +EXPANSION +EXPIRE -- added in 5.6.6 (nonreserved) +EXPLAIN (R) +EXPORT -- added in 5.6.6 (nonreserved) +EXTENDED +EXTENT_SIZE +-- F +FALSE (R) +FAST +FAULTS +FETCH (R) +FIELDS +FILE +FILE_BLOCK_SIZE -- added in 5.7.6 (nonreserved) +FILTER -- added in 5.7.3 (nonreserved) +FIRST +FIRST_VALUE (R) -- added in 8.0.2 (reserved) +FIXED +FLOAT (R) +FLOAT4 (R) +FLOAT8 (R) +FLUSH +FOLLOWING -- added in 8.0.2 (nonreserved) +FOLLOWS -- added in 5.7.2 (nonreserved) +FOR (R) +FORCE (R) +FOREIGN (R) +FORMAT -- added in 5.6.5 (nonreserved) +FOUND +FRAC_SECOND -- removed in 5.5.3 +FROM (R) +FULL +FULLTEXT (R) +FUNCTION (R) -- became reserved in 8.0.1 +-- G +GENERAL -- added in 5.5.3 (reserved); became nonreserved in 5.5.8 +GENERATED (R) -- added in 5.7.6 (reserved) +GEOMCOLLECTION -- added in 8.0.11 (nonreserved) +GEOMETRY +GEOMETRYCOLLECTION +GET (R) -- added in 5.6.4 (reserved) +GET_FORMAT +GET_MASTER_PUBLIC_KEY -- added in 8.0.11 (nonreserved) +GLOBAL +GRANT (R) +GRANTS +GROUP (R) +GROUPING (R) -- added in 8.0.1 (reserved) +GROUPS (R) -- added in 8.0.2 (reserved) +GROUP_REPLICATION -- added in 5.7.6 (nonreserved) +-- H +HANDLER +HASH +HAVING (R) +HELP +HIGH_PRIORITY (R) +HISTOGRAM -- added in 8.0.2 (nonreserved) +HISTORY -- added in 8.0.3 (nonreserved) +HOST +HOSTS +HOUR +HOUR_MICROSECOND (R) +HOUR_MINUTE (R) +HOUR_SECOND (R) +-- I +IDENTIFIED +IF (R) +IGNORE (R) +IGNORE_SERVER_IDS -- became nonreserved in 5.5.8 +IMPORT +IN (R) +INACTIVE -- added in 8.0.14 (nonreserved) +INDEX (R) +INDEXES +INFILE (R) +INITIAL_SIZE +INNER (R) +INNOBASE -- removed in 5.5.3 +INNODB -- removed in 5.5.3 +INOUT (R) +INSENSITIVE (R) +INSERT (R) +INSERT_METHOD +INSTALL +INSTANCE -- added in 5.7.11 (nonreserved) +INT (R) +INT1 (R) +INT2 (R) +INT3 (R) +INT4 (R) +INT8 (R) +INTEGER (R) +INTERSECT (M) -- Added in MariaDB 10.3.0 +INTERVAL (R) +INTO (R) +INVOKER +IO +IO_AFTER_GTIDS (R) -- added in 5.6.5 (reserved) +IO_BEFORE_GTIDS (R) -- added in 5.6.5 (reserved) +IO_THREAD +IPC +IS (R) +ISOLATION +ISSUER +ITERATE (R) +-- J +JOIN (R) +JSON -- added in 5.7.8 (nonreserved) +JSON_TABLE (R) -- added in 8.0.4 (reserved) +-- K +KEY (R) +KEYS (R) +KEY_BLOCK_SIZE +KILL (R) +-- L +LAG (R) -- added in 8.0.2 (reserved) +LANGUAGE +LAST +LAST_VALUE (R) -- added in 8.0.2 (reserved) +LEAD (R) -- added in 8.0.2 (reserved) +LEADING (R) +LEAVE (R) +LEAVES +LEFT (R) +LESS +LEVEL +LIKE (R) +LIMIT (R) +LINEAR (R) +LINES (R) +LINESTRING +LIST +LOAD (R) +LOCAL +LOCALTIME (R) +LOCALTIMESTAMP (R) +LOCK (R) +LOCKED -- added in 8.0.1 (nonreserved) +LOCKS +LOGFILE +LOGS +LONG (R) +LONGBLOB (R) +LONGTEXT (R) +LOOP (R) +END LOOP; +LOW_PRIORITY (R) +-- M +MASTER +MASTER_AUTO_POSITION -- added in 5.6.5 (nonreserved) +MASTER_BIND (R) -- added in 5.6.1 (reserved) +MASTER_CONNECT_RETRY +MASTER_DELAY +MASTER_HEARTBEAT_PERIOD -- became nonreserved in 5.5.8 +MASTER_HOST +MASTER_LOG_FILE +MASTER_LOG_POS +MASTER_PASSWORD +MASTER_PORT +MASTER_PUBLIC_KEY_PATH -- added in 8.0.11 (nonreserved) +MASTER_RETRY_COUNT -- added in 5.6.1 (nonreserved) +MASTER_SERVER_ID +MASTER_SSL +MASTER_SSL_CA +MASTER_SSL_CAPATH +MASTER_SSL_CERT +MASTER_SSL_CIPHER +MASTER_SSL_CRL -- added in 5.6.3 (nonreserved) +MASTER_SSL_CRLPATH -- added in 5.6.3 (nonreserved) +MASTER_SSL_KEY +MASTER_SSL_VERIFY_SERVER_CERT (R) +MASTER_TLS_VERSION -- added in 5.7.10 (nonreserved) +MASTER_USER +MATCH (R) +MAXVALUE (R) +MAX_CONNECTIONS_PER_HOUR +MAX_QUERIES_PER_HOUR +MAX_ROWS +MAX_SIZE +MAX_STATEMENT_TIME -- added in 5.7.4 (nonreserved); removed in 5.7.8 +MAX_UPDATES_PER_HOUR +MAX_USER_CONNECTIONS +MEDIUM +MEDIUMBLOB (R) +MEDIUMINT (R) +MEDIUMTEXT (R) +MEMORY +MERGE; +MESSAGE_TEXT +MICROSECOND +MIDDLEINT (R) +MIGRATE +MINUTE +MINUTE_MICROSECOND (R) +MINUTE_SECOND (R) +MIN_ROWS +MOD (R) +MODE +MODIFIES (R) +MODIFY +MONTH +MULTILINESTRING +MULTIPOINT +MULTIPOLYGON +MUTEX +MYSQL_ERRNO +-- N +NAME +NAMES +NATIONAL +NATURAL (R) +NCHAR +NDB +NDBCLUSTER +NESTED -- added in 8.0.4 (nonreserved) +NEVER -- added in 5.7.4 (nonreserved) +NEW +NEXT +NO +NODEGROUP +NONBLOCKING -- removed in 5.7.6 +NONE +NOT (R) +NOWAIT -- added in 8.0.1 (nonreserved) +NO_WAIT +NO_WRITE_TO_BINLOG (R) +NTH_VALUE (R) -- added in 8.0.2 (reserved) +NTILE (R) -- added in 8.0.2 (reserved) +NULL (R) +NULLS -- added in 8.0.2 (nonreserved) +NUMBER -- added in 5.6.4 (nonreserved) +NUMERIC (R) +NVARCHAR +-- O +OF (R) -- added in 8.0.1 (reserved) +OFFSET +OLD_PASSWORD -- removed in 5.7.5 +ON (R) +ONE +ONE_SHOT -- became reserved in 5.6.1; removed in 5.6.5 +ONLY -- added in 5.6.5 (nonreserved) +OPEN +OPTIMIZE (R) +OPTIMIZER_COSTS (R) -- added in 5.7.5 (reserved) +OPTION (R) +OPTIONAL -- added in 8.0.13 (nonreserved) +OPTIONALLY (R) +OPTIONS +OR (R) +ORDER (R) +ORDINALITY -- added in 8.0.4 (nonreserved) +ORGANIZATION -- added in 8.0.11 (nonreserved) +OTHERS -- added in 8.0.2 (nonreserved) +OUT (R) +OUTER (R) +OUTFILE (R) +OVER (M) -- added in 8.0.2 (reserved) +OWNER +-- P +PACK_KEYS +PAGE +PARSER +PARSE_GCOL_EXPR -- added in 5.7.6 (reserved); became nonreserved in 5.7.8 +PARTIAL +PARTITION (R) -- became reserved in 5.6.2 +PARTITIONING +PARTITIONS +PASSWORD +PATH -- added in 8.0.4 (nonreserved) +PERCENT_RANK (R) -- added in 8.0.2 (reserved) +PERSIST (R) +PERSIST_ONLY (R) -- added in 8.0.2 (reserved) +PHASE +PLUGIN +PLUGINS +PLUGIN_DIR -- added in 5.6.4 (nonreserved) +POINT +POLYGON +PORT +PRECEDES -- added in 5.7.2 (nonreserved) +PRECEDING -- added in 8.0.2 (nonreserved) +PRECISION (R) +PREPARE +PRESERVE +PREV +PRIMARY (R) +PRIVILEGES +PROCEDURE (R) +PROCESS -- added in 8.0.11 (nonreserved) +PROCESSLIST +PROFILE +PROFILES +PROXY -- added in 5.5.7 (nonreserved) +PURGE (R) +-- Q +QUARTER +QUERY +QUICK +-- R +RANGE (R) +RANK (R) -- added in 8.0.2 (reserved) +READ (R) +READS (R) +READ_ONLY +READ_WRITE (R) +REAL (R) +REBUILD +RECOVER +RECURSIVE (R) -- added in 8.0.1 (reserved) +REDOFILE -- removed in 8.0.3 +REDO_BUFFER_SIZE +REDUNDANT +REFERENCE -- added in 8.0.11 (nonreserved) +REFERENCES (R) +REGEXP (R) +RELAY -- added in 5.5.3 (nonreserved) +RELAYLOG +RELAY_LOG_FILE +RELAY_LOG_POS +RELAY_THREAD +RELEASE (R) +RELOAD +REMOTE -- added in 8.0.3 (nonreserved); removed in 8.0.14 +REMOVE +RENAME (R) +REORGANIZE +REPAIR +REPEAT (R) +REPEATABLE +REPLACE (R) +REPLICATE_DO_DB -- added in 5.7.3 (nonreserved) +REPLICATE_DO_TABLE -- added in 5.7.3 (nonreserved) +REPLICATE_IGNORE_DB -- added in 5.7.3 (nonreserved) +REPLICATE_IGNORE_TABLE -- added in 5.7.3 (nonreserved) +REPLICATE_REWRITE_DB -- added in 5.7.3 (nonreserved) +REPLICATE_WILD_DO_TABLE -- added in 5.7.3 (nonreserved) +REPLICATE_WILD_IGNORE_TABLE -- added in 5.7.3 (nonreserved) +REPLICATION +REQUIRE (R) +RESET +RESIGNAL (R) +RESOURCE -- added in 8.0.3 (nonreserved) +RESPECT -- added in 8.0.2 (nonreserved) +RESTART -- added in 8.0.11 (nonreserved) +RESTORE +RESTRICT (R) +RESUME +RETURN (R) +RETURNED_SQLSTATE -- added in 5.6.4 (nonreserved) +RETURNING (M) -- Added in MariaDB 10.0.5 +RETURNS +REUSE -- added in 8.0.3 (nonreserved) +REVERSE +REVOKE (R) +RIGHT (R) +RLIKE (R) +ROLE -- became nonreserved in 8.0.1 +ROLLBACK +ROLLUP +ROTATE -- added in 5.7.11 (nonreserved) +ROUTINE +ROW (R) -- became reserved in 8.0.2 +ROWS (R) -- became reserved in 8.0.2 +ROW_COUNT -- added in 5.6.4 (nonreserved) +ROW_FORMAT +ROW_NUMBER (R) -- added in 8.0.2 (reserved) +RTREE +-- S +SAVEPOINT +SCHEDULE +SCHEMA (R) +SCHEMAS (R) +SCHEMA_NAME +SECOND +SECONDARY_ENGINE -- added in 8.0.13 (nonreserved) +SECONDARY_LOAD -- added in 8.0.13 (nonreserved) +SECONDARY_UNLOAD -- added in 8.0.13 (nonreserved) +SECOND_MICROSECOND (R) +SECURITY +SELECT (R) +SENSITIVE (R) +SEPARATOR (R) +SERIAL +SERIALIZABLE +SERVER +SESSION +SET (R) +SHARE +SHOW (R) +SHUTDOWN +SIGNAL (R) +SIGNED +SIMPLE +SKIP -- added in 8.0.1 (nonreserved) +SLAVE +SLOW -- added in 5.5.3 (reserved); became nonreserved in 5.5.8 +SMALLINT (R) +SNAPSHOT +SOCKET +SOME +SONAME +SOUNDS +SOURCE +SPATIAL (R) +SPECIFIC (R) +SQL (R) +SQLEXCEPTION (R) +SQLSTATE (R) +SQLWARNING (R) +SQL_AFTER_GTIDS -- added in 5.6.5 (reserved); became nonreserved in 5.6.6 +SQL_AFTER_MTS_GAPS -- added in 5.6.6 (nonreserved) +SQL_BEFORE_GTIDS -- added in 5.6.5 (reserved); became nonreserved in 5.6.6 +SQL_BIG_RESULT (R) +SQL_BUFFER_RESULT +SQL_CACHE -- removed in 8.0.3 +SQL_CALC_FOUND_ROWS (R) +SQL_NO_CACHE +SQL_SMALL_RESULT (R) +SQL_THREAD +SQL_TSI_DAY +SQL_TSI_FRAC_SECOND -- removed in 5.5.3 +SQL_TSI_HOUR +SQL_TSI_MINUTE +SQL_TSI_MONTH +SQL_TSI_QUARTER +SQL_TSI_SECOND +SQL_TSI_WEEK +SQL_TSI_YEAR +SRID -- added in 8.0.3 (nonreserved) +SSL (R) +STACKED +START +END +STARTING (R) +STARTS +STATS_AUTO_RECALC -- added in 5.6.6 (nonreserved) +STATS_PERSISTENT -- added in 5.6.6 (nonreserved) +STATS_SAMPLE_PAGES -- added in 5.6.6 (nonreserved) +STATUS +STOP +STORAGE +STORED (R) -- added in 5.7.6 (reserved) +STRAIGHT_JOIN (R) +STRING +SUBCLASS_ORIGIN +SUBJECT +SUBPARTITION +SUBPARTITIONS +SUPER +SUSPEND +SWAPS +SWITCHES +SYSTEM (R) -- added in 8.0.3 (reserved) +-- T +TABLE (R) +TABLES +TABLESPACE +TABLE_CHECKSUM +TABLE_NAME +TEMPORARY +TEMPTABLE +TERMINATED (R) +TEXT +THAN +THEN (R) +END IF; +THREAD_PRIORITY -- added in 8.0.3 (nonreserved) +TIES -- added in 8.0.2 (nonreserved) +TIME +TIMESTAMP +TIMESTAMPADD +TIMESTAMPDIFF +TINYBLOB (R) +TINYINT (R) +TINYTEXT (R) +TO (R) +TRAILING (R) +TRANSACTION +TRIGGER (R) +TRIGGERS +TRUE (R) +TRUNCATE +TYPE +TYPES +-- U +UNBOUNDED -- added in 8.0.2 (nonreserved) +UNCOMMITTED +UNDEFINED +UNDO (R) +UNDOFILE +UNDO_BUFFER_SIZE +UNICODE +UNINSTALL +UNION (R) +UNIQUE (R) +UNKNOWN +UNLOCK (R) +UNSIGNED (R) +UNTIL +UPDATE (R) +UPGRADE +USAGE (R) +USE (R) +USER +USER_RESOURCES +USE_FRM +USING (R) +UTC_DATE (R) +UTC_TIME (R) +UTC_TIMESTAMP (R) +-- V +VALIDATION -- added in 5.7.5 (nonreserved) +VALUE +VALUES (R) +VARBINARY (R) +VARCHAR (R) +VARCHARACTER (R) +VARIABLES +VARYING (R) +VCPU -- added in 8.0.3 (nonreserved) +VIEW +VIRTUAL (R) -- added in 5.7.6 (reserved) +VISIBLE +-- W +WAIT +WARNINGS +WEEK +WEIGHT_STRING +WHEN (R) +WHERE (R) +WHILE (R) +WINDOW (R) -- added in 8.0.2 (reserved) +END WHILE; +WITH (R) +WITHOUT -- added in 5.7.5 (nonreserved) +WORK +WRAPPER +WRITE (R) +-- X +X509 +XA +XID -- added in 5.7.5 (nonreserved) +XML +XOR (R) +-- Y +YEAR +YEAR_MONTH (R) +-- Z +ZEROFILL (R) + +-- Data Types +-- 11.2 Numeric Types +BIT +BOOL +BOOLEAN +TINYINT +SMALLINT +MEDIUMINT +INT +INTEGER +BIGINT +SERIAL +DECIMAL +DEC +NUMERIC +FIXED +FLOAT +DOUBLE +REAL +FLOAT +-- 11.3 Date and Time Types +DATE +DATETIME +TIMESTAMP +TIME +YEAR +-- 11.4 String Types +CHAR +NCHAR +VARCHAR +NVARCHAR +BINARY +VARBINARY +TINYBLOB +TINYTEXT +BLOB +TEXT +MEDIUMBLOB +MEDIUMTEXT +LONGBLOB +LONGTEXT +ENUM +SET +-- 11.5.1 Spatial Data Types +GEOMETRY +POINT +LINESTRING +POLYGON +MULTIPOINT +MULTILINESTRING +MULTIPOLYGON +GEOMETRYCOLLECTION +-- 11.6 The JSON Data Type +JSON + +-- MariaDB 10.3 Oracle Mode +BODY +ELSIF +GOTO +HISTORY -- <= MariaDB 10.3.6 only +PACKAGE +PERIOD -- <= MariaDB 10.3.6 only +RAISE +ROWTYPE +SYSTEM -- <= MariaDB 10.3.6 only +SYSTEM_TIME -- <= MariaDB 10.3.6 only +VERSIONING -- <= MariaDB 10.3.6 only +WITHOUT -- <= MariaDB 10.3.6 only + +-- 12.3.2 Comparison Functions and Operators +COALESCE(value, ...) +GREATEST(value1, value2,...) +INTERVAL(N, N1, N2, N3, ...) +ISNULL(expr) +LEAST(value1, value2, ...) +STRCMP(expr1, expr2) +-- 12.4 Control Flow Functions +IF(expr1, expr2, expr3) +IFNULL(expr1, expr2) +NULLIF(expr1, expr2) +-- 12.5 String Functions +ASCII(str) +BIN(N) +BIT_LENGTH(str) +CHAR(N, ... [USING charset_name]) +CHAR_LENGTH(str) +CHARACTER_LENGTH(str) +CONCAT(str1, str2, ...) +CONCAT_WS(separator, str1, str2, ...) +ELT(N, str1, str2, str3, ...) +EXPORT_SET(bits, on, off [, separator [, number_of_bits]]) +FIELD(str, str1, str2, str3, ...) +FIND_IN_SET(str, strlist) +FORMAT(X, D [, locale]) +FROM_BASE64(str) +HEX(str), HEX(N) +INSERT(str, pos, len, newstr) +INSTR(str, substr) +LCASE(str) +LEFT(str, len) +LENGTH(str) +LOAD_FILE(file_name) +LOCATE(substr, str), LOCATE(substr, str, pos) +LOWER(str) +LPAD(str, len, padstr) +LTRIM(str) +MAKE_SET(bits, str1, str2, ...) +MID(str, pos, len) +OCT(N) +OCTET_LENGTH(str) +ORD(str) +POSITION(substr IN str) +QUOTE(str) +REPEAT(str, count) +REPLACE(str, from_str, to_str) +REVERSE(str) +RIGHT(str, len) +RPAD(str, len, padstr) +RTRIM(str) +SOUNDEX(str) +SPACE(N) +STRCMP(expr1, expr2) +SUBSTR(str, pos), SUBSTR(str FROM pos), SUBSTR(str, pos, len), SUBSTR(str FROM pos FOR len) +SUBSTRING(str, pos), SUBSTRING(str FROM pos), SUBSTRING(str, pos, len), SUBSTRING(str FROM pos FOR len) +SUBSTRING_INDEX(str, delim, count) +TO_BASE64(str) +TRIM([{BOTH | LEADING | TRAILING} [remstr] FROM] str), TRIM([remstr FROM] str) +UCASE(str) +UNHEX(str) +UPPER(str) +WEIGHT_STRING(str [AS {CHAR | BINARY}(N)] [flags]) +-- 12.5.2 Regular Expressions +REGEXP_INSTR(expr, pat [, pos [, occurrence [, return_option [, match_type]]]]) +REGEXP_LIKE(expr, pat [, match_type]) +REGEXP_REPLACE(expr, pat, repl [, pos [, occurrence [, match_type]]]) +REGEXP_SUBSTR(expr, pat [, pos [, occurrence [, match_type]]]) +-- 12.6 Numeric Functions and Operators +ABS(X) +ACOS(X) +ASIN(X) +ATAN(Y,X) +ATAN2(Y,X) +CEIL(X) +CEILING(X) +CONV(N, from_base, to_base) +COS(X) +COT(X) +CRC32(expr) +DEGREES(X) +DIV +EXP(X) +FLOOR(X) +FORMAT(X, D) +HEX(N_or_S) +LN(X) +LOG(X), LOG(B,X) +LOG10(X) +LOG2(X) +MOD(N, M), N % M, N MOD M +PI() +POW(X, Y) +POWER(X, Y) +RADIANS(X) +RAND([N]) +ROUND(X), ROUND(X, D) +SIGN(X) +SIN(X) +SQRT(X) +TAN(X) +TRUNCATE(X, D) +-- 12.7 Date and Time Functions +ADDDATE(date, INTERVAL expr unit), ADDDATE(expr, days) +ADDTIME(expr1, expr2) +CONVERT_TZ(dt, from_tz, to_tz) +CURDATE() +CURRENT_DATE(), CURRENT_DATE +CURRENT_TIME(), CURRENT_TIME +CURRENT_TIMESTAMP(), CURRENT_TIMESTAMP +CURTIME([fsp]) +DATE(expr) +DATE_ADD(date, INTERVAL expr unit) +DATE_FORMAT(date,format) +DATE_SUB(date, INTERVAL expr unit) +DATEDIFF(expr1, expr2) +DAY(date) +DAYNAME(date) +DAYOFMONTH(date) +DAYOFWEEK(date) +DAYOFYEAR(date) +EXTRACT(unit FROM date) +FROM_DAYS(N) +FROM_UNIXTIME(unix_timestamp), FROM_UNIXTIME(unix_timestamp, format) +GET_FORMAT({DATE | TIME | DATETIME}, {'EUR' | 'USA' | 'JIS' | 'ISO' | 'INTERNAL'}) +HOUR(time) +LAST_DAY(date) +LOCALTIME, LOCALTIME([fsp]) +LOCALTIMESTAMP, LOCALTIMESTAMP([fsp]) +MAKEDATE(year, dayofyear) +MAKETIME(hour, minute, second) +MICROSECOND(expr) +MINUTE(time) +MONTH(date) +MONTHNAME(date) +NOW([fsp]) +PERIOD_ADD(P, N) +PERIOD_DIFF(P1, P2) +QUARTER(date) +SEC_TO_TIME(seconds) +SECOND(time) +STR_TO_DATE(str, format) +SUBDATE(date, INTERVAL expr unit), SUBDATE(expr, days) +SUBTIME(expr1, expr2) +SYSDATE([fsp]) +TIME(expr) +TIME_FORMAT(time, format) +TIME_TO_SEC(time) +TIMEDIFF(expr1, expr2) +TIMESTAMP(expr), TIMESTAMP(expr1, expr2) +TIMESTAMPADD(unit, interval, datetime_expr) +TIMESTAMPDIFF(unit, datetime_expr1, datetime_expr2) +TO_DAYS(date) +TO_SECONDS(expr) +UNIX_TIMESTAMP(), UNIX_TIMESTAMP(date) +UTC_DATE, UTC_DATE() +UTC_TIME, UTC_TIME([fsp]) +UTC_TIMESTAMP, UTC_TIMESTAMP([fsp]) +WEEK(date [, mode]) +WEEKDAY(date) +WEEKOFYEAR(date) +YEAR(date) +YEARWEEK(date), YEARWEEK(date, mode) +-- 12.10 Cast Functions and Operators +BINARY +CAST(expr AS type) +CONVERT(expr, type), CONVERT(expr USING transcoding_name) +-- 12.11 XML Functions +ExtractValue(xml_frag, xpath_expr) +UpdateXML(xml_target, xpath_expr, new_xml) +-- 12.12 Bit Functions and Operators +BIT_COUNT(N) +-- 12.13 Encryption and Compression Functions +AES_DECRYPT(crypt_str, key_str [, init_vector]) +AES_ENCRYPT(str, key_str [, init_vector]) +COMPRESS(string_to_compress) +DECODE(crypt_str, pass_str) -- deprecated in 5.7.2; removed in 8.0.3 +DES_DECRYPT(crypt_str [, key_str]) -- deprecated in 5.7.6; removed in 8.0.3 +DES_ENCRYPT(str [, {key_num | key_str}])-- deprecated in 5.7.6; removed in 8.0.3 +ENCODE(str, pass_str) -- deprecated in 5.7.2; removed in 8.0.3 +ENCRYPT(str [, salt]) -- deprecated in 5.7.6; removed in 8.0.3 +MD5(str) +OLD_PASSWORD() -- removed in 5.7.5 +PASSWORD(str) -- deprecated in 5.7.6; removed in 8.0.11 +RANDOM_BYTES(len) -- added in 5.6.17 +SHA1(str), SHA(str) +SHA2(str, hash_length) +STATEMENT_DIGEST(statement) +STATEMENT_DIGEST_TEXT(statement) +UNCOMPRESS(string_to_uncompress) +UNCOMPRESSED_LENGTH(compressed_string) +VALIDATE_PASSWORD_STRENGTH(str) +-- 12.18.4 Enterprise Encryption Function Descriptions +ASYMMETRIC_DECRYPT(algorithm, crypt_str, key_str) +ASYMMETRIC_DERIVE(pub_key_str, priv_key_str) +ASYMMETRIC_ENCRYPT(algorithm, str, key_str) +ASYMMETRIC_SIGN(algorithm, digest_str, priv_key_str, digest_type) +ASYMMETRIC_VERIFY(algorithm, digest_str, sig_str, pub_key_str, digest_type) +CREATE_ASYMMETRIC_PRIV_KEY(algorithm, {key_len | dh_secret}) +CREATE_ASYMMETRIC_PUB_KEY(algorithm, priv_key_str) +CREATE_DH_PARAMETERS(key_len) +CREATE_DIGEST(digest_type, str) +-- 12.14 Information Functions +analyse([max_elements [,max_memory]]) +BENCHMARK(count, expr) +BINLOG_GTID_POS(binlog_filename, binlog_offset) -- added in MariaDB 10.0.2 +CHARSET(str) +COERCIBILITY(str) +COLLATION(str) +CONNECTION_ID() +CURRENT_ROLE() +CURRENT_USER(), CURRENT_USER +DATABASE() +DECODE_HISTOGRAM(hist_type, histogram) -- added in MariaDB 10.0.2 +FOUND_ROWS() +ICU_VERSION() +LAST_INSERT_ID(), LAST_INSERT_ID(expr) +ROLES_GRAPHML() +ROW_COUNT() +SCHEMA() +SESSION_USER() +SYSTEM_USER() +USER() +VERSION() +-- 12.15.1 Spatial Function Reference +Area() -- deprecated in 5.7.6 +AsBinary(), AsWKB() -- deprecated in 5.7.6 +AsText(), AsWKT() -- deprecated in 5.7.6 +Boundary(g) -- added in MariaDB 10.1.2 +Buffer() -- deprecated in 5.7.6 +Centroid() -- deprecated in 5.7.6 +Contains() -- deprecated in 5.7.6 +ConvexHull() -- deprecated in 5.7.6 +Crosses() -- deprecated in 5.7.6 +Dimension() -- deprecated in 5.7.6 +Disjoint() -- deprecated in 5.7.6 +Distance() -- deprecated in 5.7.6 +EndPoint() -- deprecated in 5.7.6 +Envelope() -- deprecated in 5.7.6 +Equals() -- deprecated in 5.7.6 +ExteriorRing() -- deprecated in 5.7.6 +GeomCollFromText(), GeometryCollectionFromText() -- deprecated in 5.7.6 +GeomCollFromWKB(), GeometryCollectionFromWKB() -- deprecated in 5.7.6 +GeomCollection(g [, g] ...) +GeometryCollection(g [, g] ...) +GeometryN() -- deprecated in 5.7.6 +GeometryType() -- deprecated in 5.7.6 +GeomFromText(), GeometryFromText() -- deprecated in 5.7.6 +GeomFromWKB(), GeometryFromWKB() -- deprecated in 5.7.6 +GLength() -- deprecated in 5.7.6 +InteriorRingN() -- deprecated in 5.7.6 +Intersects() -- deprecated in 5.7.6 +IsClosed() -- deprecated in 5.7.6 +IsEmpty() -- deprecated in 5.7.6 +IsSimple() -- deprecated in 5.7.6 +IsRing(g) -- added in MariaDB 10.1.2 +LineFromText(), LineStringFromText() -- deprecated in 5.7.6 +LineFromWKB(), LineStringFromWKB() -- deprecated in 5.7.6 +LineString(pt [, pt] ...) +MBRContains(g1, g2) +MBRCoveredBy(g1, g2) +MBRCovers(g1, g2) +MBRDisjoint(g1, g2) +MBREqual() -- deprecated in 5.7.6 +MBREquals(g1, g2) +MBRIntersects(g1, g2) +MBROverlaps(g1, g2) +MBRTouches(g1, g2) +MBRWithin(g1, g2) +MLineFromText(), MultiLineStringFromText() -- deprecated in 5.7.6 +MLineFromWKB(), MultiLineStringFromWKB() -- deprecated in 5.7.6 +MPointFromText(), MultiPointFromText() -- deprecated in 5.7.6 +MPointFromWKB(), MultiPointFromWKB() -- deprecated in 5.7.6 +MPolyFromText(), MultiPolygonFromText() -- deprecated in 5.7.6 +MPolyFromWKB(), MultiPolygonFromWKB() -- deprecated in 5.7.6 +MultiLineString(ls [, ls] ...) +MultiPoint(pt [, pt2] ...) +MultiPolygon(poly [, poly] ...) +NumGeometries() -- deprecated in 5.7.6 +NumInteriorRings() -- deprecated in 5.7.6 +NumPoints() -- deprecated in 5.7.6 +Overlaps() -- deprecated in 5.7.6 +Point(x, y) +PointFromText() -- deprecated in 5.7.6 +PointFromWKB() -- deprecated in 5.7.6 +PointN() -- deprecated in 5.7.6 +PointOnSurface(g) -- added in MariaDB 10.1.2 +PolyFromText(), PolygonFromText() -- deprecated in 5.7.6 +PolyFromWKB(), PolygonFromWKB() -- deprecated in 5.7.6 +Polygon(ls [, ls] ...) +SRID() -- deprecated in 5.7.6 +ST_Area({poly | mpoly}) +ST_AsBinary(g [, options]), ST_AsWKB(g [, options]) +ST_AsGeoJSON(g [, max_dec_digits [, options]]) +ST_AsText(g [, options]), ST_AsWKT(g [, options]) +ST_Boundary(g) -- added in MariaDB 10.1.2 +ST_Buffer(g, d[, strategy1[, strategy2[, strategy3]]]) +ST_Buffer_Strategy(strategy[, points_per_circle]) +ST_Centroid({poly | mpoly}) +ST_Contains(g1, g2) +ST_ConvexHull(g) +ST_Crosses(g1, g2) +ST_Difference(g1, g2) +ST_Dimension(g) +ST_Disjoint(g1, g2) +ST_Distance(g1, g2) +ST_Distance_Sphere(g1, g2 [, radius]) +ST_EndPoint(ls) +ST_Envelope(g) +ST_Equals(g1, g2) +ST_ExteriorRing(poly) +ST_GeoHash(longitude, latitude, max_length), ST_GeoHash(point, max_length) +ST_GeomCollFromText(wkt [, srid [, options]]), ST_GeometryCollectionFromText(wkt [, srid [, options]]), ST_GeomCollFromTxt(wkt [, srid [, options]]) +ST_GeomCollFromWKB(wkb [, srid [, options]]), ST_GeometryCollectionFromWKB(wkb [, srid [, options]]) +ST_GeometryN(gc, N) +ST_GeometryType(g) +ST_GeomFromGeoJSON(str [, options [, srid]]) +ST_GeomFromText(wkt [, srid [, options]]), ST_GeometryFromText(wkt [, srid [, options]]) +ST_GeomFromWKB(wkb [, srid [, options]]), ST_GeometryFromWKB(wkb [, srid [, options]]) +ST_InteriorRingN(poly, N) +ST_Intersection(g1, g2) +ST_Intersects(g1, g2) +ST_IsClosed(ls) +ST_IsEmpty(g) +ST_IsSimple(g) +ST_IsRing(g) -- added in MariaDB 10.1.2 +ST_IsValid(g) +ST_LatFromGeoHash(geohash_str) +ST_Latitude(p [, new_latitude_val]) -- added in 8.0.12 +ST_Length(ls) +ST_LineFromText(wkt [, srid [, options]]), ST_LineStringFromText(wkt [, srid [, options]]) +ST_LineFromWKB(wkb [, srid [, options]]), ST_LineStringFromWKB(wkb [, srid [, options]]) +ST_LongFromGeoHash(geohash_str) +ST_Longitude(p [, new_longitude_val]) -- added in 8.0.12 +ST_MakeEnvelope(pt1, pt2) +ST_MLineFromText(wkt [, srid [, options]]), ST_MultiLineStringFromText(wkt [, srid [, options]]) +ST_MLineFromWKB(wkb [, srid [, options]]), ST_MultiLineStringFromWKB(wkb [, srid [, options]]) +ST_MPointFromText(wkt [, srid [, options]]), ST_MultiPointFromText(wkt [, srid [, options]]) +ST_MPointFromWKB(wkb [, srid [, options]]), ST_MultiPointFromWKB(wkb [, srid [, options]]) +ST_MPolyFromText(wkt [, srid [, options]]), ST_MultiPolygonFromText(wkt [, srid [, options]]) +ST_PolyFromWKB(wkb [, srid [, options]]), ST_PolygonFromWKB(wkb [, srid [, options]]) +ST_NumGeometries(gc) +ST_NumInteriorRing(poly), ST_NumInteriorRings(poly) +ST_NumPoints(ls) +ST_Overlaps(g1, g2) +ST_PointFromGeoHash(geohash_str, srid) +ST_PointFromText(wkt [, srid [, options]]) +ST_PointFromWKB(wkb [, srid [, options]]) +ST_PointN(ls, N) +ST_PointOnSurface(g) -- added in MariaDB 10.1.2 +ST_PolyFromText(wkt [, srid [, options]]), ST_PolygonFromText(wkt [, srid [, options]]) +ST_MPolyFromWKB(wkb [, srid [, options]]), ST_MultiPolygonFromWKB(wkb [, srid [, options]]) +ST_Relate(g1, g2, i) -- added in MariaDB 10.1.2 +ST_Simplify(g, max_distance) +ST_SRID(g [, srid]) +ST_StartPoint(ls) +ST_SwapXY(g) +ST_SymDifference(g1, g2) +ST_Touches(g1, g2) +ST_Transform(g, target_srid) +ST_Union(g1, g2) +ST_Validate(g) +ST_Within(g1, g2) +ST_X(p [, new_x_val]) +ST_Y(p [, new_y_val]) +StartPoint() -- deprecated in 5.7.6 +Touches() -- deprecated in 5.7.6 +Within() -- deprecated in 5.7.6 +X() -- deprecated in 5.7.6 +Y() -- deprecated in 5.7.6 +-- 12.16.1 JSON Function Reference +JSON_APPEND(json_doc, path, val [, path, val] ...) -- deprecated in 5.7.9 +JSON_ARRAY([val [, val] ...]) +JSON_ARRAY_APPEND(json_doc, path, val [, path, val] ...) +JSON_ARRAY_INSERT(json_doc, path, val [, path, val] ...) +JSON_CONTAINS(target, candidate [, path]) +JSON_CONTAINS_PATH(json_doc, one_or_all, path [, path] ...) +JSON_DEPTH(json_doc) +JSON_EXTRACT(json_doc, path [, path] ...) +JSON_INSERT(json_doc, path, val [, path, val] ...) +JSON_KEYS(json_doc [, path]) +JSON_LENGTH(json_doc [, path]) +JSON_MERGE(json_doc, json_doc [, json_doc] ...) -- deprecated in 5.7.22 +JSON_MERGE_PATCH(json_doc, json_doc [, json_doc] ...) +JSON_MERGE_PRESERVE(json_doc, json_doc [, json_doc] ...) +JSON_OBJECT([key, val [, key, val] ...]) +JSON_PRETTY(json_val) +JSON_QUOTE(string) +JSON_REMOVE(json_doc, path [, path] ...) +JSON_REPLACE(json_doc, path, val [, path, val] ...) +JSON_SEARCH(json_doc, one_or_all, search_str [, escape_char [, path] ...]) +JSON_SET(json_doc, path, val [, path, val] ...) +JSON_STORAGE_FREE(json_val) +JSON_STORAGE_SIZE(json_val) +JSON_TABLE(expr, path COLUMNS (column_list) [AS] alias) +JSON_TYPE(json_val) +JSON_UNQUOTE(json_val) +JSON_VALID(val) +-- 12.17 Functions Used with Global Transaction IDs +GTID_SUBSET(subset, set) +GTID_SUBTRACT(set, subset) +WAIT_FOR_EXECUTED_GTID_SET(gtid_set [, timeout]) +SQL_THREAD_WAIT_AFTER_GTIDS(gtid_set [, timeout]) -- deprecated 5.6.9 +WAIT_UNTIL_SQL_THREAD_AFTER_GTIDS(gtid_set [, timeout] [, channel]) +-- 12.19.1 Aggregate (GROUP BY) Function Descriptions +AVG([DISTINCT] expr) [over_clause] +BIT_AND(expr) [over_clause] +BIT_OR(expr) [over_clause] +BIT_XOR(expr) [over_clause] +COUNT(expr) [over_clause] +COUNT(DISTINCT) +COUNT(DISTINCT expr [, expr...]) +GROUP_CONCAT(expr) +JSON_ARRAYAGG(col_or_expr) +JSON_OBJECTAGG(key, value) +MAX([DISTINCT] expr) [over_clause] +MIN([DISTINCT] expr) [over_clause] +STD(expr) [over_clause] +STDDEV(expr) [over_clause] +STDDEV_POP(expr) [over_clause] +STDDEV_SAMP(expr) [over_clause] +SUM([DISTINCT] expr) [over_clause] +VAR_POP(expr) [over_clause] +VAR_SAMP(expr) [over_clause] +VARIANCE(expr) [over_clause] +-- 12.20 Window Functions +CUME_DIST() over_clause +DENSE_RANK() over_clause +FIRST_VALUE(expr) [null_treatment] over_clause +LAG(expr [, N [, default]]) [null_treatment] over_clause +LAST_VALUE(expr) [null_treatment] over_clause +LEAD(expr [, N [, default]]) [null_treatment] over_clause +MEDIAN(expr) over_clause -- added in MariaDB 10.3.3 +NTH_VALUE(expr, N) [from_first_last] [null_treatment] over_clause +NTILE(N) over_clause +PERCENT_RANK() over_clause +PERCENTILE_CONT(expr) -- added in MariaDB 10.3.3 +PERCENTILE_DISC(expr) -- added in MariaDB 10.3.3 +RANK() over_clause +ROW_NUMBER() over_clause +-- 12.21 Internal Functions +CAN_ACCESS_COLUMN(ARGS) +CAN_ACCESS_DATABASE(ARGS) +CAN_ACCESS_TABLE(ARGS) +CAN_ACCESS_VIEW(ARGS) +GET_DD_COLUMN_PRIVILEGES(ARGS) +GET_DD_CREATE_OPTIONS(ARGS) +GET_DD_INDEX_SUB_PART_LENGTH(ARGS) +INTERNAL_AUTO_INCREMENT(ARGS) +INTERNAL_AVG_ROW_LENGTH(ARGS) +INTERNAL_CHECK_TIME(ARGS) +INTERNAL_CHECKSUM(ARGS) +INTERNAL_DATA_FREE(ARGS) +INTERNAL_DATA_LENGTH(ARGS) +INTERNAL_DD_CHAR_LENGTH(ARGS) +INTERNAL_GET_COMMENT_OR_ERROR(ARGS) +INTERNAL_GET_VIEW_WARNING_OR_ERROR(ARGS) +INTERNAL_INDEX_COLUMN_CARDINALITY(ARGS) +INTERNAL_INDEX_LENGTH(ARGS) +INTERNAL_KEYS_DISABLED(ARGS) +INTERNAL_MAX_DATA_LENGTH(ARGS) +INTERNAL_TABLE_ROWS(ARGS) +INTERNAL_UPDATE_TIME(ARGS) +IS_VISIBLE_DD_OBJECT(ARGS) +-- 12.20 Miscellaneous Functions +ANY_VALUE(arg) +BIN_TO_UUID(binary_uuid), BIN_TO_UUID(binary_uuid, swap_flag) +DEFAULT(col_name) +FORMAT(X, D) +GET_LOCK(str, timeout) +GROUPING(expr [, expr] ...) +INET_ATON(expr) +INET_NTOA(expr) +INET6_ATON(expr) +INET6_NTOA(expr) +IS_FREE_LOCK(str) +IS_IPV4(expr) +IS_IPV4_COMPAT(expr) +IS_IPV4_MAPPED(expr) +IS_IPV6(expr) +IS_USED_LOCK(str) +IS_UUID(string_uuid) +MASTER_GTID_WAIT(gtid-list [, timeout) -- added in MariaDB 10.0.9 +MASTER_POS_WAIT(log_name, log_pos [, timeout] [, channel]) +NAME_CONST(name, value) +RAND() +RELEASE_ALL_LOCKS() +RELEASE_LOCK(str) +SLEEP(duration) +UUID() +UUID_SHORT() +UUID_TO_BIN(string_uuid), UUID_TO_BIN(string_uuid, swap_flag) +VALUE(col_name) -- added in MariaDB 10.3.3 +VALUES(col_name) + +-- MariaDB Built-in Functions https://mariadb.com/kb/en/library/built-in-functions/ + +-- Dynamic Columns Functions +COLUMN_ADD(dyncol_blob, column_nr, value [as type], [column_nr, value [as type]]...) +COLUMN_ADD(dyncol_blob, column_name, value [as type], [column_name, value [as type]]...) +COLUMN_CHECK(dyncol_blob) -- added in 10.0.1 +COLUMN_CREATE(column_nr, value [as type], [column_nr, value [as type]]...) +COLUMN_CREATE(column_name, value [as type], [column_name, value [as type]]...) +COLUMN_DELETE(dyncol_blob, column_nr, column_nr...) +COLUMN_DELETE(dyncol_blob, column_name, column_name...) +COLUMN_EXISTS(dyncol_blob, column_nr) +COLUMN_EXISTS(dyncol_blob, column_name) +COLUMN_GET(dyncol_blob, column_nr as type) +COLUMN_GET(dyncol_blob, column_name as type) +COLUMN_JSON(dyncol_blob) -- added in 10.0.1 +COLUMN_LIST(dyncol_blob) +-- JSON Functions +JSON_COMPACT(json_doc) -- added in MariaDB 10.2.4 +JSON_DETAILED(json_doc [, tab_size]) -- added in MariaDB 10.2.4 +JSON_EXISTS(json_doc, path) -- added in MariaDB 10.2.3 +JSON_LOOSE(json_doc) -- added in MariaDB 10.2.4 +JSON_QUERY(json_doc, path) -- added in MariaDB 10.2.3 +JSON_VALUE(json_doc, path) -- added in MariaDB 10.2.3 +-- Spider Functions +SPIDER_BG_DIRECT_SQL('sql', 'tmp_table_list', 'parameters') +SPIDER_COPY_TABLES(spider_table_name, source_link_id, destination_link_id_list [,parameters]) +SPIDER_DIRECT_SQL('sql', 'tmp_table_list', 'parameters') +SPIDER_FLUSH_TABLE_MON_CACHE() +-- SEQUENCE Functions +SEQUENCE -- added in MariaDB 10.3 +LASTVAL(sequence_name) -- added in MariaDB 10.3 +NEXTVAL(sequence_name) -- added in MariaDB 10.3 +SETVAL(sequence_name, next_value, [is_used, [round]]) -- added in MariaDB 10.3 diff --git a/Build/tools/lang/POSIX.c b/Build/tools/lang/POSIX.c new file mode 100644 index 000000000..7887a8c2f --- /dev/null +++ b/Build/tools/lang/POSIX.c @@ -0,0 +1,4 @@ +// https://en.wikipedia.org/wiki/C_POSIX_library +// POSIX.1-2017 http://pubs.opengroup.org/onlinepubs/9699919799/ +// http://pubs.opengroup.org/onlinepubs/9699919799/idx/head.html +// https://www.kernel.org/doc/man-pages/ diff --git a/Build/tools/lang/SQLite3.sql b/Build/tools/lang/SQLite3.sql new file mode 100644 index 000000000..8ede970a6 --- /dev/null +++ b/Build/tools/lang/SQLite3.sql @@ -0,0 +1,256 @@ +-- https://sqlite.org/lang.html +-- keywords +-- https://sqlite.org/lang_keywords.html +ABORT +ACTION +ADD +AFTER +ALL +ALTER +ANALYZE +AND +AS +ASC +ATTACH +AUTOINCREMENT +BEFORE +BEGIN +BETWEEN +BY +CASCADE +CASE +CAST +CHECK +COLLATE +COLUMN +COMMIT +CONFLICT +CONSTRAINT +CREATE +CROSS +CURRENT_DATE +CURRENT_TIME +CURRENT_TIMESTAMP +DATABASE +DEFAULT +DEFERRABLE +DEFERRED +DELETE +DESC +DETACH +DISTINCT +DROP +EACH +ELSE +END +ESCAPE +EXCEPT +EXCLUSIVE +EXISTS +EXPLAIN +FAIL +FOR +FOREIGN +FROM +FULL +GLOB +GROUP +HAVING +IF +IGNORE +IMMEDIATE +IN +INDEX +INDEXED +INITIALLY +INNER +INSERT +INSTEAD +INTERSECT +INTO +IS +ISNULL +JOIN +KEY +LEFT +LIKE +LIMIT +MATCH +NATURAL +NO +NOT +NOTNULL +NULL +OF +OFFSET +ON +OR +ORDER +OUTER +PLAN +PRAGMA +PRIMARY +QUERY +RAISE +RECURSIVE +REFERENCES +REGEXP +REINDEX +RELEASE +RENAME +REPLACE +RESTRICT +RIGHT +ROLLBACK +ROW +SAVEPOINT +SELECT +SET +TABLE +TEMP +TEMPORARY +THEN +TO +TRANSACTION +TRIGGER +UNION +UNIQUE +UPDATE +USING +VACUUM +VALUES +VIEW +VIRTUAL +WHEN +WHERE +WITH +WITHOUT + +-- Datatypes +-- https://sqlite.org/datatype3.html +TEXT +NUMERIC +INTEGER +REAL +BLOB +-- Type Affinity +BIGINT +BOOLEAN +CHARACTER +CLOB +DATE +DATETIME +DECIMAL +DOUBLE +DOUBLE PRECISION +FLOAT +INT +INT2 +INT8 +INTEGER +MEDIUMINT +NATIVE CHARACTER +NCHAR +NUMERIC +NVARCHAR +REAL +SMALLINT +TEXT +TINYINT +UNSIGNED BIGINT +VARCHAR +VARYING CHARACTER +-- Collating Sequences +BINARY +NOCASE +RTRIM + +-- aggregate functions +-- https://sqlite.org/lang_aggfunc.html +avg(X) +count(*) +count(X) +group_concat(X) +group_concat(X,Y) +max(X) +min(X) +sum(X) +total(X) +-- date and time functions +-- https://sqlite.org/lang_datefunc.html +date(timestring, modifier, modifier, ...) +datetime(timestring, modifier, modifier, ...) +julianday(timestring, modifier, modifier, ...) +strftime(format, timestring, modifier, modifier, ...) +time(timestring, modifier, modifier, ...) +-- core functions +-- https://sqlite.org/lang_corefunc.html +abs(X) +changes() +char(X1,X2,...,XN) +coalesce(X,Y,...) +glob(X,Y) +hex(X) +ifnull(X,Y) +instr(X,Y) +last_insert_rowid() +length(X) +like(X,Y) +like(X,Y,Z) +likelihood(X,Y) +likely(X) +load_extension(X) +load_extension(X,Y) +lower(X) +ltrim(X) +ltrim(X,Y) +max(X,Y,...) +min(X,Y,...) +nullif(X,Y) +printf(FORMAT,...) +quote(X) +random() +randomblob(N) +replace(X,Y,Z) +round(X) +round(X,Y) +rtrim(X) +rtrim(X,Y) +soundex(X) +sqlite_compileoption_get(N) +sqlite_compileoption_used(X) +sqlite_source_id() +sqlite_version() +substr(X,Y) +substr(X,Y,Z) +total_changes() +trim(X) +trim(X,Y) +typeof(X) +unicode(X) +unlikely(X) +upper(X) +zeroblob(N) +-- JSON1 +-- https://www.sqlite.org/json1.html +json(json) +json_array(value1,value2,...) +json_array_length(json) +json_array_length(json,path) +json_extract(json,path,...) +json_insert(json,path,value,...) +json_object(label1,value1,...) +json_patch(json1,json2) +json_remove(json,path,...) +json_replace(json,path,value,...) +json_set(json,path,value,...) +json_type(json) +json_type(json,path) +json_valid(json) +json_quote(value) +json_group_array(value) +json_group_object(name,value) +json_each(json) +json_each(json,path) +json_tree(json) +json_tree(json,path) diff --git a/Build/tools/lang/html.html b/Build/tools/lang/html.html new file mode 100644 index 000000000..2208671de --- /dev/null +++ b/Build/tools/lang/html.html @@ -0,0 +1,345 @@ + + + + + + + + + + + + + HTML5 + + + + +
+
+ + +

+

+

+

+
+
+
+
+ +

+
+
+

+		
+
    +
      +
    • +
      +
      +
      +
      +
      +
      +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      + +
      + + + + + + + + + +
      +
      + +
      + + + + + + + + + + + + + + + + +
      + + + + + + + + + + + + + + </plaintext> + <spacer></spacer> + <strike></strike> + <tt></tt> + <xmp></xmp> + <!-- Obsolete Attributes --> + <html version> + <head profile> + <meta scheme> + </head> + <body alink background bgcolor bottommargin leftmargin link marginheight marginwidth rightmargin text topmargin vlink> + <a charset coords datafld dataformatas datasrc name methods rev shape urn></a> + <area hreflang nohref type> + <br clear> + <button datafld dataformatas datasrc></button> + <div align datafld dataformatas datasrc></div> + <dl compact></dl> + <embed align hspace name vspace> + <form accept> + <fieldset datafld></fieldset> + <input align border datafld dataformatas datasrc hspace ismap usemap vspace> + <label datafld dataformatas datasrc></label> + <select datafld dataformatas datasrc> + <option dataformatas datasrc name></option> + </select> + </form> + <frame bordercolor datafld datasrc></frame> + <h1 align></h1> + <hr align color noshade size type width> + <iframe align allowtransparency datafld datasrc frameborder framespacing hspace longdesc marginheight marginwidth scrolling vspace></iframe> + <img align border datafld datasrc hspace longdesc lowsrc name vspace> + <legend align datafld dataformatas datasrc></legend> + <link rev charset methods target urn> + <object align archive border classid code codebase codetype datafld dataformatas datasrc declare hspace standby vspace> + <param datafld type valuetype> + </object> + <ol compact></ol> + <p align></p> + <pre width></pre> + <script event for language></script> + <table align background bgcolor border bordercolor cellpadding cellspacing datapagesize datasrc frame height rules summary width> + <caption align></caption> + <thead align background valign char charoff> + <tr align background bgcolor char charoff valign> + <th align axis background bgcolor char charoff height nowrap valign width></th> + </tr> + </thead> + <colgroup align char charoff valign width> + <col align char charoff valign width> + </colgroup> + <tbody align background char charoff valign> + <tr> + <td abbr align axis background bgcolor char charoff height nowrap scope valign width></td> + </tr> + </tbody> + <tfoot align background char charoff valign></tfoot> + </table> + <textarea datafld datasrc></textarea> + <ul compact type> + <li type></li> + </ul> + </body> + </html> + </body> +</html> diff --git a/Build/tools/readme.txt b/Build/tools/readme.txt new file mode 100644 index 000000000..d0dc7eec4 --- /dev/null +++ b/Build/tools/readme.txt @@ -0,0 +1,6 @@ +images: + Visual Studio Image Library 2017 + https://www.microsoft.com/en-us/download/details.aspx?id=35825 + + file original + RedCrossMark TestCoveredFailing