keywords.h (2049B)
1 /* 2 * FlatBuffers keyword table 3 * 4 * See luthor project test files for more details on keyword table 5 * syntax. 6 * 7 * In brief: Keywords are assigned a hash key that is easy 8 * for the lexer to test. 9 * 10 * The first char is length of keyword, two next chars are the leading 11 * to characters of the keyword, and the last char is the last char of 12 * the keyword. For keywords longer than 9 add length to '0' in the 13 * first character. For keywords shorter than 3 characters, see luthor 14 * project - we don't need it. The keywords should be sorted. 15 */ 16 17 LEX_KW_TABLE_BEGIN 18 lex_kw(int, '3', 'i', 'n', 't') 19 lex_kw(bool, '4', 'b', 'o', 'l') 20 lex_kw(byte, '4', 'b', 'y', 'e') 21 lex_kw(char, '4', 'c', 'h', 'r') 22 lex_kw(enum, '4', 'e', 'n', 'm') 23 lex_kw(int8, '4', 'i', 'n', '8') 24 lex_kw(long, '4', 'l', 'o', 'g') 25 lex_kw(null, '4', 'n', 'u', 'l') 26 lex_kw(true, '4', 't', 'r', 'e') 27 lex_kw(uint, '4', 'u', 'i', 't') 28 lex_kw(false, '5', 'f', 'a', 'e') 29 lex_kw(float, '5', 'f', 'l', 't') 30 lex_kw(int32, '5', 'i', 'n', '2') 31 lex_kw(int16, '5', 'i', 'n', '6') 32 lex_kw(int64, '5', 'i', 'n', '4') 33 lex_kw(table, '5', 't', 'a', 'e') 34 lex_kw(ubyte, '5', 'u', 'b', 'e') 35 lex_kw(uint8, '5', 'u', 'i', '8') 36 lex_kw(ulong, '5', 'u', 'l', 'g') 37 lex_kw(union, '5', 'u', 'n', 'n') 38 lex_kw(short, '5', 's', 'h', 't') 39 lex_kw(double, '6', 'd', 'o', 'e') 40 lex_kw(string, '6', 's', 't', 'g') 41 lex_kw(struct, '6', 's', 't', 't') 42 lex_kw(uint32, '6', 'u', 'i', '2') 43 lex_kw(uint16, '6', 'u', 'i', '6') 44 lex_kw(uint64, '6', 'u', 'i', '4') 45 lex_kw(ushort, '6', 'u', 's', 't') 46 lex_kw(float32, '7', 'f', 'l', '2') 47 lex_kw(float64, '7', 'f', 'l', '4') 48 lex_kw(include, '7', 'i', 'n', 'e') 49 lex_kw(attribute, '9', 'a', 't', 'e') 50 lex_kw(namespace, '9', 'n', 'a', 'e') 51 lex_kw(root_type, '9', 'r', 'o', 'e') 52 lex_kw(rpc_service, '0' + 11, 'r', 'p', 'e') 53 lex_kw(file_extension, '0' + 14, 'f', 'i', 'n') 54 lex_kw(file_identifier, '0' + 15, 'f', 'i', 'r') 55 LEX_KW_TABLE_END 56