+ add: Zufuliu's python tools to generate source code snippets

This commit is contained in:
Rainer Kottenhoff 2019-03-13 09:19:22 +01:00
parent 9b4d8754ed
commit f09ea37d65
43 changed files with 5028 additions and 0 deletions

96
Build/tools/AccessKey.py Normal file
View File

@ -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')

528
Build/tools/Bitmap.py Normal file
View File

@ -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('<I', fd.read(4))[0]
self.reserved1, self.reserved2 = struct.unpack('<HH', fd.read(2*2))
self.offset = struct.unpack('<I', fd.read(4))[0]
assert self.offset == 54
def write(self, fd):
fd.write(b'BM')
fd.write(struct.pack('<I', self.size))
fd.write(struct.pack('<HH', self.reserved1, self.reserved2))
fd.write(struct.pack('<I', self.offset))
def __str__(self):
return f'''BitmapFileHeader {{
size: {self.size :08X} {self.size}
reserved: {self.reserved1 :04X} {self.reserved2 :04X}
offset: {self.offset :08X} {self.offset}
}}'''
_InchesPerMetre = 0.0254
_TransparentColor = (0, 0, 0, 0)
class CompressionMethod(IntEnum):
BI_RGB = 0
BI_RLE8 = 1
BI_RLE4 = 2
BI_BITFIELDS = 3
BI_JPEG = 4
BI_PNG = 5
BI_ALPHABITFIELDS = 6
BI_CMYK = 11
BI_CMYKRLE8 = 12
BI_CMYKRLE4 = 13
@staticmethod
def getName(value):
try:
return CompressionMethod(value).name
except ValueError:
return f'Unknown-{value}'
class BitmapInfoHeader(object):
StructureSize = 40
def __init__(self):
self.width = 0
self.height = 0
self.planes = 1
self.bitsPerPixel = 32
self.compression = 0
self.sizeImage = 0
self.resolutionX = 96
self.resolutionY = 96
self.colorUsed = 0
self.colorImportant = 0
def read(self, fd):
magic, self.width, self.height = struct.unpack('<III', fd.read(4*3))
assert magic == BitmapInfoHeader.StructureSize
self.planes, self.bitsPerPixel = struct.unpack('<HH', fd.read(2*2))
assert self.planes == 1
self.compression, self.sizeImage = struct.unpack('<II', fd.read(4*2))
self._resolutionX, self._resolutionY = struct.unpack('<II', fd.read(4*2))
self.colorUsed, self.colorImportant = struct.unpack('<II', fd.read(4*2))
def write(self, fd):
fd.write(struct.pack('<III', BitmapInfoHeader.StructureSize, self.width, self.height))
fd.write(struct.pack('<HH', self.planes, self.bitsPerPixel))
fd.write(struct.pack('<II', self.compression, self.sizeImage))
fd.write(struct.pack('<II', self._resolutionX, self._resolutionY))
fd.write(struct.pack('<II', self.colorUsed, self.colorImportant))
@property
def size(self):
return (self.width, self.height)
@property
def resolutionX(self):
return round(self._resolutionX * _InchesPerMetre)
@resolutionX.setter
def resolutionX(self, value):
self._resolutionX = round(value / _InchesPerMetre)
@property
def resolutionY(self):
return round(self._resolutionY * _InchesPerMetre)
@resolutionY.setter
def resolutionY(self, value):
self._resolutionY = round(value / _InchesPerMetre)
@property
def resolution(self):
return (self.resolutionX, self.resolutionY)
@resolution.setter
def resolution(self, value):
self.resolutionX = value[0]
self.resolutionY = value[1]
def __str__(self):
return f'''BitmapInfoHeader {{
width: {self.width :08X} {self.width}
height: {self.height :08X} {self.height}
planes: {self.planes :04X} {self.planes}
bitsPerPixel: {self.bitsPerPixel :04X} {self.bitsPerPixel}
compression: {self.compression :08X} {self.compression} {CompressionMethod.getName(self.compression)}
sizeImage: {self.sizeImage :08X} {self.sizeImage}
resolutionX: {self._resolutionX :08X} {self._resolutionX} {self.resolutionX} DPI
resolutionY: {self._resolutionY :08X} {self._resolutionY} {self.resolutionY} DPI
colorUsed: {self.colorUsed :08X} {self.colorUsed}
colorImportant: {self.colorImportant :08X} {self.colorImportant}
}}'''
class Bitmap(object):
def __init__(self, width=None, height=None, bitsPerPixel=32):
self.fileHeader = BitmapFileHeader()
self.infoHeader = BitmapInfoHeader()
self.rows = [] # RGBA tuple
self.data = None
self.infoHeader.bitsPerPixel = bitsPerPixel
if width and height:
for y in range(height):
row = [_TransparentColor] * width
self.rows.append(row)
self.infoHeader.width = width
self.infoHeader.height = height
def read(self, fd):
start = fd.tell()
self.fileHeader.read(fd)
self.infoHeader.read(fd)
curret = fd.tell()
# enable reading from stream
offset = self.fileHeader.offset - (curret - start)
if offset != 0:
fd.seek(offset, os.SEEK_CUR)
# TODO: sizeImage maybe zero
self.data = fd.read()
self.decode()
def write(self, fd):
self.encode()
self.fileHeader.write(fd)
self.infoHeader.write(fd)
fd.write(self.data)
def decode(self):
if not self.data:
return
bitsPerPixel = self.bitsPerPixel
if bitsPerPixel == 32:
self._decode_32bit()
elif bitsPerPixel == 24:
self._decode_24bit()
else:
print(f'Warning: decode not implemented for {bitsPerPixel} bit bitmap', file=sys.stderr)
def encode(self):
if not self.rows:
return
bitsPerPixel = self.bitsPerPixel
if bitsPerPixel == 32:
self._encode_32bit()
elif bitsPerPixel == 24:
self._encode_24bit()
else:
print(f'Warning: encode not implemented for {bitsPerPixel} bit bitmap', file=sys.stderr)
def _set_data(self, buf):
self.data = bytes(buf)
size = len(buf)
self.infoHeader.sizeImage = size
self.fileHeader.size = size + BitmapFileHeader.StructureSize + BitmapInfoHeader.StructureSize
def _decode_32bit(self):
width, height = self.size
self.rows.clear()
offset = 0
buf = self.data
rows = []
for y in range(height):
row = []
for x in range(width):
blue = buf[offset]
green = buf[offset + 1]
red = buf[offset + 2]
alpha = buf[offset + 3]
offset += 4
row.append((red, green, blue, alpha))
rows.append(row)
self.rows.extend(reversed(rows))
def _encode_32bit(self):
width, height = self.size
buf = []
for y in range(height - 1, -1, -1):
row = self.rows[y]
for x in range(width):
red, green, blue, alpha = row[x]
buf.append(blue)
buf.append(green)
buf.append(red)
buf.append(alpha)
self._set_data(buf)
def _decode_24bit(self):
width, height = self.size
self.rows.clear()
offset = 0
buf = self.data
padding = math.ceil(24*width/32)*4 - width*3
rows = []
for y in range(height):
row = []
for x in range(width):
blue = buf[offset]
green = buf[offset + 1]
red = buf[offset + 2]
offset += 3
row.append((red, green, blue, 0xFF))
offset += padding
rows.append(row)
self.rows.extend(reversed(rows))
def _encode_24bit(self):
width, height = self.size
padding = math.ceil(24*width/32)*4 - width*3
paddingBytes = [0] * padding
buf = []
for y in range(height - 1, -1, -1):
row = self.rows[y]
for x in range(width):
red, green, blue, alpha = row[x]
buf.append(blue)
buf.append(green)
buf.append(red)
if paddingBytes:
buf.extend(paddingBytes)
self._set_data(buf)
@property
def width(self):
return self.infoHeader.width
@property
def height(self):
return self.infoHeader.height
@property
def size(self):
return self.infoHeader.size
@property
def resolutionX(self):
return self.infoHeader.resolutionX
@resolutionX.setter
def resolutionX(self, value):
self.infoHeader.resolutionX = value
@property
def resolutionY(self):
return self.infoHeader.resolutionY
@resolutionX.setter
def resolutionY(self, value):
self.infoHeader.resolutionY = value
@property
def resolution(self):
return self.infoHeader.resolution
@resolution.setter
def resolution(self, value):
self.infoHeader.resolution = value
@property
def bitsPerPixel(self):
return self.infoHeader.bitsPerPixel
@bitsPerPixel.setter
def bitsPerPixel(self, value):
self.infoHeader.bitsPerPixel = value
def __getitem__(self, key):
return self.getColor(key[0], key[1])
def __setitem__(self, key, value):
self.setColor(key[0], key[1], value)
def getColor(self, x, y):
return self.rows[y][x]
def setColor(self, x, y, color):
if len(color) == 3:
color = (color[0], color[1], color[2], 0xFF)
elif len(color) != 4:
raise ValueError('Invalid color:' + str(color))
self.rows[y][x] = color
def save(self, path):
if hasattr(path, 'write'):
self.write(path)
else:
with open(path, 'wb') as fd:
self.write(fd)
@staticmethod
def fromFile(path):
bmp = Bitmap()
if hasattr(path, 'read'):
bmp.read(path)
else:
with open(path, 'rb') as fd:
bmp.read(fd)
return bmp
@staticmethod
def fromImage(image):
if image.mode != 'RGB' and image.mode != 'RGBA':
image = image.convert('RGBA')
width, height = image.size
data = image.load()
if image.mode == 'RGB':
bmp = Bitmap(width, height, 24)
for y in range(height):
for x in range(width):
bmp[x, y] = data[x, y]
else:
bmp = Bitmap(width, height, 32)
for y in range(height):
for x in range(width):
color = data[x, y]
# TODO: fix transparent color
if color[3] == 0:
bmp[x, y] = _TransparentColor
else:
bmp[x, y] = color
return bmp
def toImage(self):
image = None
width, height = self.size
bitsPerPixel = self.bitsPerPixel
if bitsPerPixel == 24:
image = Image.new('RGB', (width, height))
data = []
for row in self.rows:
for red, green, blue, alpha in row:
data.append((red, green, blue))
image.putdata(data)
elif bitsPerPixel == 32:
image = Image.new('RGBA', (width, height))
data = []
for row in self.rows:
data.extend(row)
image.putdata(data)
else:
print(f'Warning: toImage not implemented for {bitsPerPixel} bit bitmap', file=sys.stderr)
return image
@staticmethod
def fromFileEx(path):
image = Image.open(path)
if image.format == 'BMP':
try:
bmp = Bitmap.fromFile(path)
if bmp.bitsPerPixel == 24 or bmp.bitsPerPixel == 32:
return bmp
except Exception:
pass
return Bitmap.fromImage(image)
@staticmethod
def concatHorizontal(bmps):
width = 0
height = 0
for bmp in bmps:
width += bmp.width
if height == 0:
height = bmp.height
elif height != bmp.height:
raise ValueError(f'Invalid image height {bmp.height}, requre {height}!')
out_bmp = Bitmap(width, height)
rows = out_bmp.rows
for y in range(height):
rows[y].clear()
for bmp in bmps:
for y in range(height):
rows[y].extend(bmp.rows[y])
return out_bmp
def splitHorizontal(self, dims=None):
width, height = self.size
if not dims:
dims = [height] * (width // height)
w = width % height
if w:
dims.append(w)
else:
used = []
total = 0
for w in dims:
total += w
if total > 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

83
Build/tools/CountColor.py Normal file
View File

@ -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])

39
Build/tools/FindPrime.py Normal file
View File

@ -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()

View File

@ -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()

163
Build/tools/ImageTool.py Normal file
View File

@ -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')

233
Build/tools/StringSwitch.py Normal file
View File

@ -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)

Binary file not shown.

After

Width:  |  Height:  |  Size: 362 B

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
<style type="text/css">
.icon-canvas-transparent{opacity:0;fill:#F6F6F6;}
.icon-vs-out{fill:#F6F6F6;}
.icon-vs-bg{fill:#424242;}
.icon-vs-action-green{fill:#388A34;}
</style>
<g id="canvas">
<path class="icon-canvas-transparent" d="M16,16H0V0h16V16z"/>
</g>
<g id="outline">
<path class="icon-vs-out" d="M15.991,2L10,10.045V16H6v-5.955L4.477,8H2V6H0V2h0.022H0.008H2V0h4v2H15.991z"/>
</g>
<g id="iconBg">
<path class="icon-vs-bg" d="M14,3L9,9.714V15H7V9.714L5.723,8H6V6h2V3H14z"/>
</g>
<g id="colorAction">
<path class="icon-vs-action-green" d="M7,5H5v2H3.019V5H1V3.018h2.019V1H5v2.018h2V5z"/>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
<g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1011 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#f6f6f6}.st2{fill:none}.st3{fill:#424242}.st4{fill:#f0eff1}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M16 1H3v5H0v9h13v-5h3z"/></g><g id="icon_x5F_bg"><path class="st2" d="M11 8H2v5h9V8zm-2 3H4v-1h5v1z"/><path class="st3" d="M4 10h5v1H4zM4 2v4h1V3h9v5h-1v1h2V2z"/><path class="st3" d="M1 14h11V7H1v7zm1-6h9v5H2V8zM7 5h5v1H7z"/></g><g id="icon_x5F_fg"><path class="st2" d="M4 10h5v1H4z"/><path class="st4" d="M5 3v3h2V5h5v1h1v2h1V3zM2 13h9V8H2v5zm2-3h5v1H4v-1z"/></g></svg>

After

Width:  |  Height:  |  Size: 608 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 416 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-bg{fill:#424242}.icon-vs-action-red{fill:#a1260d}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 6.351l-4 4.999V16H8v-4.649L4.738 7.273l-.768-.768L2 8.475l-2-2v-.95L1.495 4.03 0 2.535v-.949L1.586 0h.828L3.97 1.556 5.525 0h.828l2.061 2.061-1.97 1.97.97.969H16v1.351z" id="outline"/><path class="icon-vs-bg" d="M15 6l-4 5v4H9v-4L6.517 7.897 8.414 6H15z" id="iconBg"/><g id="colorAction"><path class="icon-vs-action-red" d="M5.03 4.03L7 6 5.939 7.061l-1.97-1.97L2 7.061.939 6l1.97-1.97-1.97-1.97L2 1l1.97 1.97L5.939 1 7 2.06 5.03 4.03z"/></g></svg>

After

Width:  |  Height:  |  Size: 761 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-bg{fill:#424242;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M13.872 16h-1.752l-4.12-3.662-4.119 3.662h-1.753l2.083-6.479-4.211-3.006v-1.515h5.665l1.607-5h1.457l1.607 5h5.664v1.515l-4.21 3.007 2.082 6.478z" id="outline"/><path class="icon-vs-bg" d="M10.614 9.133l1.886 5.867-4.5-4-4.5 4 1.887-5.867-4.387-3.133h5.394l1.607-5 1.606 5h5.393l-4.386 3.133z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 616 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#f6f6f6}.st2{fill:#424242}.st3{fill:#00539c}.st4{fill:#f0eff1}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M10.023 1H6.414l-1-1H.586l2 2H0v4h2.586l-2 2H2v5c0 1.299 1.012 2 1.965 2h8c1.442 0 2.007-1.175 2.035-2V4.552L10.023 1z"/></g><path class="st2" d="M9.641 2H7.414l1 1H9v3h3v7H4V8H3v5c0 1 .965 1 .965 1h8c1 0 1.035-1 1.035-1V5L9.641 2z" id="icon_x5F_bg"/><path class="st3" d="M5 1H3l2 2H1v2h4L3 7h2l3-3z" id="color_x5F_action"/><g id="icon_x5F_fg"><path class="st4" d="M9 3h-.586L9 3.586zM9 6V4.414L5.414 8H4v5h8V6z"/></g></svg>

After

Width:  |  Height:  |  Size: 665 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-action-blue{fill:#00539c}</style><path class="icon-canvas-transparent" d="M0 16V0h16v16H0z" id="canvas"/><path class="icon-vs-out" d="M16 8.328v-.656L8.707.379 5.879 3.207 8.672 6H0v4h8.672l-2.793 2.793 2.828 2.828z" id="outline"/><g id="iconBg"><path class="icon-vs-action-blue" d="M7.293 12.793L11.086 9H1V7h10.086L7.293 3.207l1.414-1.414L14.914 8l-6.207 6.207-1.414-1.414z"/></g></svg>

After

Width:  |  Height:  |  Size: 538 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{opacity:0}.st0,.st1{fill:#f6f6f6}.st2{fill:#dcb67a}.st3{fill:#00539c}.st4{fill:#f0eff1}</style><g id="outline"><path class="st0" d="M0 0h16v16H0z"/><path class="st1" d="M14.5 0H6.39l-1 2H2.504C1.677 2 1 2.673 1 3.5v11.914l2-2V16h4v-2.586l2 2V13h5.5c.827 0 1.5-.673 1.5-1.5v-10c0-.827-.673-1.5-1.5-1.5z"/></g><path class="st2" d="M14.5 1H7.008l-1 2H2.504A.503.503 0 0 0 2 3.5v6.082l2.998-2.996 4.002 4V12h5.5a.5.5 0 0 0 .5-.5v-10a.5.5 0 0 0-.5-.5zM14 3H7.508l.5-1H14v1z" id="icon_x5F_bg"/><path class="st3" d="M8 11L5 8l-3 3v2l2-2v4h2v-4l2 2v-2z" id="color_x5F_action"/><path class="st4" d="M14 2v1H7.5L8 2z" id="icon_x5F_fg"/></svg>

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-action-blue{fill:#00539c}</style><path class="icon-canvas-transparent" d="M16 0v16H0V0h16z" id="canvas"/><path class="icon-vs-out" d="M0 7.672v.656l7.293 7.293 2.828-2.828L7.328 10H16V6H7.328l2.793-2.793L7.293.379z" id="outline"/><g id="iconBg"><path class="icon-vs-action-blue" d="M8.707 3.207L4.914 7H15v2H4.914l3.793 3.793-1.414 1.414L1.086 8l6.207-6.207 1.414 1.414z"/></g></svg>

After

Width:  |  Height:  |  Size: 533 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 394 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.st0{fill:#f6f6f6}.st1{fill:#424242}.st2{fill:#00539c}.st3{fill:#f0eff1}</style><path class="st0" d="M12.061 0H6c-.97 0-2 .701-2 2v5.365c-1.178.562-2 1.75-2 3.135 0 .321.046.639.137.949L0 13.586v.828L1.586 16h.828l2.137-2.137c.309.091.627.137.949.137.079 0 .152-.019.23-.023.09.012.18.024.27.024h8c1.299 0 2-1.031 2-2V3.556L12.061 0z" id="outline"/><path class="st1" d="M11.641 1H5.964S5 1 5 2v5.066c.165-.024.329-.05.5-.05s.335.026.5.05V2h5v3h3v7.001H8.648a3.505 3.505 0 0 1-.708 1h6.024c1 0 1.035-1 1.035-1V4l-3.358-3z" id="icon_x5F_bg"/><path class="st2" d="M5.5 8.016A2.486 2.486 0 0 0 3 10.5c0 .432.12.832.313 1.188L1 14l1 1 2.313-2.313c.354.194.754.313 1.187.313A2.5 2.5 0 0 0 8 10.5a2.486 2.486 0 0 0-2.5-2.484zM5.5 12a1.5 1.5 0 1 1 .001-3.001A1.5 1.5 0 0 1 5.5 12z" id="color_x5F_importance"/><g id="icon_x5F_fg"><circle class="st3" cx="5.5" cy="10.5" r="1.5"/><path class="st3" d="M11 5V2H6v5.066c1.691.244 3 1.683 3 3.434 0 .539-.133 1.044-.352 1.501H14V5h-3z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 296 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" enable-background="new 0 0 16 16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-out{fill:#F6F6F6;} .icon-vs-red{fill:#E51400;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M1.717 11.631l3.631-3.631-3.631-3.631 2.651-2.651 3.632 3.63 3.631-3.631 2.652 2.651-3.631 3.632 3.631 3.631-2.652 2.652-3.631-3.631-3.632 3.631-2.651-2.652z" id="outline"/><path class="icon-vs-red" d="M9.238 8l3.631 3.631-1.238 1.238-3.631-3.631-3.631 3.631-1.237-1.238 3.63-3.631-3.631-3.631 1.237-1.237 3.632 3.63 3.631-3.631 1.238 1.237-3.631 3.632z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 710 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 524 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><style type="text/css">.icon-canvas-transparent{opacity:0;fill:#F6F6F6;} .icon-vs-action-blue{fill:#00539C;} .icon-vs-bg{fill:#424242;} .icon-vs-out{fill:#F6F6F6;}</style><path class="icon-canvas-transparent" d="M16 16h-16v-16h16v16z" id="canvas"/><path class="icon-vs-out" d="M16 4v3h-.992l-1.125 9h-7.766l-1.047-8.373-1.372 1.181-2.099-2.099 1.957-1.715-.494.006h-3.062v-3.485l1.602-1.515h1.398v.349c.499-.261.93-.349 1.503-.349 1.757 0 3.201 1.308 3.446 3h5.051v1h3z" id="outline"/><path class="icon-vs-bg" d="M15 5v1h-8.074c.302-.293.555-.627.732-1h.342v-1h4v1h3zm-1 2l-1 8h-6l-1-8h8zm-1 1h-6l.5 3h5l.5-3z" id="iconBg"/><g id="colorAction"><path class="icon-vs-action-blue" d="M7 3.5c0-1.378-1.12-2.5-2.497-2.5-.593 0-.924.097-1.616.594l-.887.768v-1.362l-1 .945v2.055h2.062l-.032-.031.97-.969h-1.24l.773-.644c.32-.207.614-.356.97-.356.826 0 1.498.673 1.498 1.5 0 .438-.191.854-.53 1.145l-2.409 2.112.688.688 2.378-2.046c.555-.476.872-1.169.872-1.899z"/></g></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-action-green{fill:#388a34}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M3 0l10.667 8L3 16V0z" id="outline"/><g id="iconBg"><path class="icon-vs-action-green" d="M4 2v12l8-6-8-6z"/></g></svg>

After

Width:  |  Height:  |  Size: 405 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 237 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-fg{fill:#f0eff1}.icon-vs-action-blue{fill:#00539c}</style><path class="icon-canvas-transparent" d="M16 0v16H0V0h16z" id="canvas"/><path class="icon-vs-out" d="M16 2v14H2.586L0 13.414V2C0 .897.897 0 2 0h12c1.102 0 2 .897 2 2z" id="outline"/><path class="icon-vs-fg" d="M13 3v4H3V3h10zm-9 7v5h2v-3h2v3h4v-5H4z" id="iconFg"/><g id="iconBg"><path class="icon-vs-action-blue" d="M6 12h2v3H6v-3zm9-10v13h-3v-5H4v5H3l-2-2V2a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1zm-2 1H3v4h10V3z"/></g></svg>

After

Width:  |  Height:  |  Size: 626 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 310 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><style>.icon-canvas-transparent{opacity:0;fill:#f6f6f6}.icon-vs-out{fill:#f6f6f6}.icon-vs-action-blue{fill:#00539c}</style><path class="icon-canvas-transparent" d="M16 16H0V0h16v16z" id="canvas"/><path class="icon-vs-out" d="M8.328 0h-.656L.379 7.293l2.828 2.828L6 7.328V16h4V7.328l2.793 2.793 2.828-2.828z" id="outline"/><path class="icon-vs-action-blue" d="M12.793 8.707L9 4.914V15H7V4.914L3.207 8.707 1.793 7.293 8 1.086l6.207 6.207-1.414 1.414z" id="iconBg"/></svg>

After

Width:  |  Height:  |  Size: 529 B

1303
Build/tools/lang/C.c Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
-- http://hive.apache.org/
-- https://cwiki.apache.org/confluence/display/Hive/LanguageManual

View File

@ -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<Response> 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)

1332
Build/tools/lang/MySQL.sql Normal file

File diff suppressed because it is too large Load Diff

4
Build/tools/lang/POSIX.c Normal file
View File

@ -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/

View File

@ -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)

345
Build/tools/lang/html.html Normal file
View File

@ -0,0 +1,345 @@
<!--
HTML 5.2 https://www.w3.org/TR/html5/ 2017-12-14
https://whatwg.org/
https://www.w3.org/TR/html5-diff/
https://www.w3.org/TR/html4/
https://www.w3.org/TR/xhtml2/
-->
<!DOCTYPE html>
<!-- Global attributes https://www.w3.org/TR/html5/dom.html#global-attributes -->
<html
accesskey
class
contenteditable
dir="ltr rtl auto"
draggable
hidden
id
lang="en"
spellcheck
style
tabindex
title
translate="yes no"
>
<head>
<!-- https://www.w3.org/TR/html5/document-metadata.html -->
<base href target>
<!-- Link types https://www.w3.org/TR/html5/links.html
alternate author bookmark external help icon license next nofollow noopener noreferrer prev search stylesheet tag
-->
<link href
crossorigin="anonymous use-credentials"
rel="alternate author help icon license next prev search stylesheet"
rev media nonce hreflang type="text/plain text/css"
referrerpolicy="no-referrer no-referrer-when-downgrade unsafe-url origin-when-cross-origin" sizes>
<!-- Standard metadata names https://www.w3.org/TR/html5/document-metadata.html#standard-metadata-names
application-name author description generator keywords
referrer[never default always origin-when-crossorigin]
-->
<meta name http-equiv="content-language content-type default-style refresh set-cookie content-security-policy" content charset="utf-8">
<style media nonce type="text/css"></style>
<title>HTML5</title>
</head>
<!-- event handler content attributes https://www.w3.org/TR/html5/dom.html#global-attributes -->
<body
onabort
onauxclick
onblur*
oncancel
oncanplay
oncanplaythrough
onchange
onclick
onclose
oncuechange
ondblclick
ondrag
ondragend
ondragenter
ondragexit
ondragleave
ondragover
ondragstart
ondrop
ondurationchange
onemptied
onended
onerror*
onfocus*
oninput
oninvalid
onkeydown
onkeypress
onkeyup
onload*
onloadeddata
onloadedmetadata
onloadend
onloadstart
onmousedown
onmouseenter
onmouseleave
onmousemove
onmouseout
onmouseover
onmouseup
onwheel
onpause
onplay
onplaying
onprogress
onratechange
onreset
onresize*
onscroll*
onseeked
onseeking
onselect
onshow
onstalled
onsubmit
onsuspend
ontimeupdate
ontoggle
onvolumechange
onwaiting
onafterprint
onbeforeprint
onbeforeunload
onhashchange
onlanguagechange
onmessage
onoffline
ononline
onpagehide
onpageshow
onpopstate
onrejectionhandled
onstorage
onunhandledrejection
onunload
oncut
oncopy
onpaste
>
<!-- Sections https://www.w3.org/TR/html5/sections.html -->
<article></article>
<section></section>
<nav></nav>
<aside></aside>
<h1></h1>
<h2></h2>
<h3></h3>
<h4></h4>
<h5></h5>
<h6></h6>
<header></header>
<footer></footer>
<!-- Grouping content https://www.w3.org/TR/html5/grouping-content.html -->
<p></p>
<address></address>
<hr>
<pre></pre>
<blockquote cite></blockquote>
<ol reversed start type="decimal lower-alpha upper-alpha lower-roman upper-roman"></ol>
<ul></ul>
<li value></li>
<dl></dl>
<dt></dt>
<dd></dd>
<figure></figure>
<figcaption></figcaption>
<main></main>
<div></div>
<!-- Text-level semantics https://www.w3.org/TR/html5/textlevel-semantics.html -->
<a href="about:, blob:, data:, http:, https:, mailto:, sms:, urn:, tel:"
target="_blank _self _parent _top" download
rel="alternate author bookmark external help license next nofollow noopener noreferrer prev search tag"
rev hreflang type referrerpolicy></a>
<em></em>
<strong></strong>
<small></small>
<s></s>
<cite></cite>
<q></q>
<dfn></dfn>
<abbr></abbr>
<ruby></ruby>
<rb></rb>
<rt></rt>
<rtc></rtc>
<rp></rp>
<data value></data>
<time datetime></time>
<code></code>
<var></var>
<samp></samp>
<kbd></kbd>
<sub></sub>
<sup></sup>
<i></i>
<b></b>
<u></u>
<mark></mark>
<bdi></bdi>
<bdo></bdo>
<span></span>
<br>
<wbr>
<!-- Edits https://www.w3.org/TR/html5/edits.html -->
<ins cite datetime></ins>
<del cite datetime></del>
<!-- Embedded content https://www.w3.org/TR/html5/semantics-embedded-content.html -->
<picture></picture>
<source src type srcset sizes media>
<img alt src srcset sizes crossorigin usemap ismap width height referrerpolicy longdesc>
<iframe src srcdoc name sandbox allowfullscreen allowpaymentrequest width height referrerpolicy></iframe>
<embed src type width height>
<object data type typemustmatch name form width height></object>
<param name value>
<video src crossorigin poster preload="none metadata auto" autoplay loop muted controls width height></video>
<audio src crossorigin preload autoplay loop muted controls></audio>
<track kind="subtitles captions descriptions chapters metadata" src srclang label default
onaddtrack
onremovetrack
onenter
onexit
>
<map name></map>
<area alt coords download href hreflang rel shape="circle circ default poly polygon rect rectangle" target type referrerpolicy>
<!-- Tabular data https://www.w3.org/TR/html5/tabular-data.html -->
<table border>
<caption></caption>
<colgroup span>
<col span>
</colgroup>
<thead>
<tr><th colspan rowspan headers scope abbr></th></tr>
</thead>
<tbody>
<tr><td colspan rowspan headers></td></tr>
</tbody>
<tfoot></tfoot>
</table>
<!-- Forms https://www.w3.org/TR/html5/sec-forms.html -->
<form accept-charset action autocomplete
enctype="application/x-www-form-urlencoded multipart/form-data text/plain" method name novalidate target>
<label for></label>
<input accept="audio/* video/* image/*"
alt autocomplete autofocus checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min minlength multiple name pattern placeholder readonly required size src step
type="hidden text search tel url email password date month week time datetime-local number range color checkbox radio file submit image reset button"
value width>
<button autofocus disabled form formaction formenctype formmethod formnovalidate formtarget name type="submit reset button" value></button>
<select autocomplete autofocus disabled form multiple name required size>
<optgroup disabled label>
<option disabled label selected value></option>
</optgroup>
</select>
<datalist></datalist>
<textarea autocomplete autofocus cols dirname disabled form maxlength minlength name placeholder readonly required rows wrap></textarea>
<output for form name></output>
<progress value max></progress>
<meter value min max low high optimum></meter>
<fieldset disabled form name><legend></legend></fieldset>
</form>
<!-- Interactive elements https://www.w3.org/TR/html5/interactive-elements.html -->
<details open></details>
<summary></summary>
<dialog open></dialog>
<!-- Scripting https://www.w3.org/TR/html5/semantics-scripting.html -->
<script src type="text/javascript text/ecmascript text/jscript text/livescript module text/plain text/xml application/octet-stream application/xml"
charset async defer crossorigin nonce></script>
<noscript></noscript>
<template></template>
<canvas width height></canvas>
<!-- Obsolete features https://www.w3.org/TR/html5/obsolete.html -->
<!-- Obsolete Elements https://www.w3.org/TR/html5-diff/ -->
<applet datafld datasrc></applet>
<acronym></acronym>
<bgsound></bgsound>
<basefont>
<big></big>
<blink></blink>
<center></center>
<dir></dir>
<font></font>
<frame>
<frameset></frameset>
<isindex>
<listing></listing>
<marquee bgcolor datafld dataformatas datasrc height hspace vspace width></marquee>
<menu compact></menu>
<menuitem></menuitem>
<multicol></multicol>
<nobr></nobr>
<noembed></noembed>
<noframes></noframes>
<plaintext></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>

6
Build/tools/readme.txt Normal file
View File

@ -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