summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-02-02 19:01:58 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-02-02 19:01:58 -0500
commit59960f2907f6ea8af83dc606273d304e923fb4b6 (patch)
treec917d757b5d16f160f42624ec0e6cb444e2e1011
parente8b7d01ff68fed675d1397f4556f159f0c32246d (diff)
better syntax highlighting (split keywords into keywords + builtins)
-rw-r--r--base.h7
-rw-r--r--colors.h2
-rw-r--r--keywords.h189
-rw-r--r--keywords.py194
-rw-r--r--string32.c3
-rw-r--r--syntax.c107
-rw-r--r--ted.cfg5
-rw-r--r--ted.h3
8 files changed, 286 insertions, 224 deletions
diff --git a/base.h b/base.h
index 293d95e..a526c6b 100644
--- a/base.h
+++ b/base.h
@@ -64,6 +64,13 @@ typedef unsigned long ulong;
typedef long long llong;
typedef unsigned long long ullong;
+// allows
+// switch (c) {
+// case ANY_DIGIT:
+// ...
+// }
+#define ANY_DIGIT '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9'
+
#if __clang__
#define ENUM_U8 typedef enum : u8
#define ENUM_U8_END(name) name
diff --git a/colors.h b/colors.h
index 0bb2528..e2ac2af 100644
--- a/colors.h
+++ b/colors.h
@@ -24,6 +24,7 @@ ENUM_U16 {
COLOR_CANCEL,
COLOR_KEYWORD,
+ COLOR_BUILTIN,
COLOR_COMMENT,
COLOR_PREPROCESSOR,
COLOR_STRING,
@@ -58,6 +59,7 @@ static ColorName const color_names[COLOR_COUNT] = {
{COLOR_ERROR_BORDER, "error-border"},
{COLOR_ACTIVE_TAB_HL, "active-tab-hl"},
{COLOR_KEYWORD, "keyword"},
+ {COLOR_BUILTIN, "builtin"},
{COLOR_COMMENT, "comment"},
{COLOR_PREPROCESSOR, "preprocessor"},
{COLOR_STRING, "string"},
diff --git a/keywords.h b/keywords.h
index 4f4b1e6..d364c6f 100644
--- a/keywords.h
+++ b/keywords.h
@@ -1,88 +1,117 @@
-static char const *const syntax_keywords_c_A[11] = {"ATOMIC_ADDRESS_LOCK_FREE","ATOMIC_CHAR16_T_LOCK_FREE","ATOMIC_CHAR32_T_LOCK_FREE","ATOMIC_CHAR_LOCK_FREE","ATOMIC_FLAG_LOCK_FREE","ATOMIC_INT_LOCK_FREE","ATOMIC_LLONG_LOCK_FREE","ATOMIC_LONG_LOCK_FREE","ATOMIC_SHORT_LOCK_FREE","ATOMIC_WCHAR_T_LOCK_FREE"};
-static char const *const syntax_keywords_c_B[2] = {"BUFSIZ"};
-static char const *const syntax_keywords_c_C[5] = {"CHAR_BIT","CHAR_MAX","CHAR_MIN","CLOCKS_PER_SEC"};
-static char const *const syntax_keywords_c_D[12] = {"DBL_DIG","DBL_EPSILON","DBL_HAS_SUBNORM","DBL_MANT_DIG","DBL_MAX","DBL_MAX_10_EXP","DBL_MAX_EXP","DBL_MIN","DBL_MIN_EXP","DBL_TRUE_MIN","DECIMAL_DIG"};
-static char const *const syntax_keywords_c_E[128] = {"E2BIG","EACCES","EADDRINUSE","EADDRNOTAVAIL","EADV","EAFNOSUPPORT","EAGAIN","EALREADY","EBADE","EBADF","EBADFD","EBADMSG","EBADR","EBADRQC","EBADSLT","EBFONT","EBUSY","ECHILD","ECHRNG","ECOMM","ECONNABORTED","ECONNREFUSED","ECONNRESET","EDEADLK","EDEADLOCK","EDESTADDRREQ","EDOM","EDOTDOT","EDQUOT","EEXIST","EFAULT","EFBIG","EHOSTDOWN","EHOSTUNREACH","EIDRM","EILSEQ","EINPROGRESS","EINTR","EINVAL","EIO","EISCONN","EISDIR","EISNAM","EL2HLT","EL2NSYNC","EL3HLT","EL3RST","ELIBACC","ELIBBAD","ELIBEXEC","ELIBMAX","ELIBSCN","ELNRNG","ELOOP","EMEDIUMTYPE","EMFILE","EMLINK","EMSGSIZE","EMULTIHOP","ENAMETOOLONG","ENAVAIL","ENETDOWN","ENETRESET","ENETUNREACH","ENFILE","ENOANO","ENOBUFS","ENOCSI","ENODATA","ENODEV","ENOENT","ENOEXEC","ENOLCK","ENOLINK","ENOMEDIUM","ENOMEM","ENOMSG","ENONET","ENOPKG","ENOPROTOOPT","ENOSPC","ENOSR","ENOSTR","ENOSYS","ENOTBLK","ENOTCONN","ENOTDIR","ENOTEMPTY","ENOTNAM","ENOTSOCK","ENOTTY","ENOTUNIQ","ENXIO","EOF","EOPNOTSUPP","EOVERFLOW","EPERM","EPFNOSUPPORT","EPIPE","EPROTO","EPROTONOSUPPORT","EPROTOTYPE","ERANGE","EREMCHG","EREMOTE","EREMOTEIO","ERESTART","EROFS","ESHUTDOWN","ESOCKTNOSUPPORT","ESPIPE","ESRCH","ESRMNT","ESTALE","ESTRPIPE","ETIME","ETIMEDOUT","ETOOMANYREFS","ETXTBSY","EUCLEAN","EUNATCH","EUSERS","EWOULDBLOCK","EXDEV","EXFULL","EXIT_FAILURE","EXIT_SUCCESS"};
-static char const *const syntax_keywords_c_F[39] = {"FE_ALL_EXCEPT","FE_DFL_ENV","FE_DIVBYZERO","FE_DOWNWARD","FE_INEXACT","FE_INVALID","FE_OVERFLOW","FE_TONEAREST","FE_TOWARDZERO","FE_UNDERFLOW","FE_UPWARD","FILE","FILENAME_MAX","FLT_DECIMAL_DIG","FLT_DIG","FLT_EVAL_METHOD","FLT_HAS_SUBNORM","FLT_MANT_DIG","FLT_MAX","FLT_MAX_10_EXP","FLT_MAX_EXP","FLT_MIN","FLT_MIN_10_EXP","FLT_MIN_EXP","FLT_RADIX","FLT_ROUNDS","FLT_TRUE_MIN","FOPEN_MAX","FP_FAST_FMA","FP_FAST_FMAF","FP_FAST_FMAL","FP_ILOGB0","FP_ILOGBNAN","FP_INFINITE","FP_NAN","FP_NORMAL","FP_SUBNORMAL","FP_ZERO"};
-static char const *const syntax_keywords_c_H[4] = {"HUGE_VAL","HUGE_VALF","HUGE_VALL"};
-static char const *const syntax_keywords_c_I[33] = {"I","INFINITY","INT16_MAX","INT16_MIN","INT32_MAX","INT32_MIN","INT64_MAX","INT64_MIN","INT8_MAX","INT8_MIN","INTMAX_MAX","INTMAX_MIN","INTPTR_MAX","INTPTR_MIN","INT_FAST16_MAX","INT_FAST16_MIN","INT_FAST32_MAX","INT_FAST32_MIN","INT_FAST64_MAX","INT_FAST64_MIN","INT_FAST8_MAX","INT_FAST8_MIN","INT_LEAST16_MAX","INT_LEAST16_MIN","INT_LEAST32_MAX","INT_LEAST32_MIN","INT_LEAST64_MAX","INT_LEAST64_MIN","INT_LEAST8_MAX","INT_LEAST8_MIN","INT_MAX","INT_MIN"};
-static char const *const syntax_keywords_c_L[23] = {"LC_ALL","LC_COLLATE","LC_CTYPE","LC_MONETARY","LC_NUMERIC","LC_TIME","LDBL_DECIMAL_DIG","LDBL_DIG","LDBL_EPSILON","LDBL_MANT_DIG","LDBL_MAX","LDBL_MAX_10_EXP","LDBL_MAX_EXP","LDBL_MIN","LDBL_MIN_10_EXP","LDBL_MIN_EXP","LDBL_TRUE_MIN","LLONG_MAX","LLONG_MIN","LONG_MAX","LONG_MIN","L_tmpnam"};
-static char const *const syntax_keywords_c_M[5] = {"MATH_ERREXCEPT","MATH_ERRNO","MB_CUR_MAX","MB_LEN_MAX"};
-static char const *const syntax_keywords_c_N[4] = {"NAN","NDEBUG","NULL"};
-static char const *const syntax_keywords_c_O[2] = {"ONCE_FLAG_INIT"};
-static char const *const syntax_keywords_c_P[87] = {"PRIX16","PRIX32","PRIX64","PRIX8","PRIXFAST16","PRIXFAST32","PRIXFAST64","PRIXFAST8","PRIXLEAST16","PRIXLEAST32","PRIXLEAST64","PRIXLEAST8","PRIXMAX","PRIXPTR","PRId16","PRId32","PRId64","PRId8","PRIdFAST16","PRIdFAST32","PRIdFAST64","PRIdFAST8","PRIdLEAST16","PRIdLEAST32","PRIdLEAST64","PRIdLEAST8","PRIdMAX","PRIdPTR","PRIi16","PRIi32","PRIi64","PRIi8","PRIiFAST16","PRIiFAST32","PRIiFAST64","PRIiFAST8","PRIiLEAST16","PRIiLEAST32","PRIiLEAST64","PRIiLEAST8","PRIiMAX","PRIiPTR","PRIo16","PRIo32","PRIo64","PRIo8","PRIoFAST16","PRIoFAST32","PRIoFAST64","PRIoFAST8","PRIoLEAST16","PRIoLEAST32","PRIoLEAST64","PRIoLEAST8","PRIoMAX","PRIoPTR","PRIu16","PRIu32","PRIu64","PRIu8","PRIuFAST16","PRIuFAST32","PRIuFAST64","PRIuFAST8","PRIuLEAST16","PRIuLEAST32","PRIuLEAST64","PRIuLEAST8","PRIuMAX","PRIuPTR","PRIx16","PRIx32","PRIx64","PRIx8","PRIxFAST16","PRIxFAST32","PRIxFAST64","PRIxFAST8","PRIxLEAST16","PRIxLEAST32","PRIxLEAST64","PRIxLEAST8","PRIxMAX","PRIxPTR","PTRDIFF_MAX","PTRDIFF_MIN"};
-static char const *const syntax_keywords_c_R[2] = {"RSIZE_MAX"};
-static char const *const syntax_keywords_c_S[122] = {"SCHAR_MAX","SCHAR_MIN","SCNd16","SCNd32","SCNd64","SCNd8","SCNdFAST16","SCNdFAST32","SCNdFAST64","SCNdFAST8","SCNdLEAST16","SCNdLEAST32","SCNdLEAST64","SCNdLEAST8","SCNdMAX","SCNdPTR","SCNi16","SCNi32","SCNi64","SCNi8","SCNiFAST16","SCNiFAST32","SCNiFAST64","SCNiFAST8","SCNiLEAST16","SCNiLEAST32","SCNiLEAST64","SCNiLEAST8","SCNiMAX","SCNiPTR","SCNo16","SCNo32","SCNo64","SCNo8","SCNoFAST16","SCNoFAST32","SCNoFAST64","SCNoFAST8","SCNoLEAST16","SCNoLEAST32","SCNoLEAST64","SCNoLEAST8","SCNoMAX","SCNoPTR","SCNu16","SCNu32","SCNu64","SCNu8","SCNuFAST16","SCNuFAST32","SCNuFAST64","SCNuFAST8","SCNuLEAST16","SCNuLEAST32","SCNuLEAST64","SCNuLEAST8","SCNuMAX","SCNuPTR","SCNx16","SCNx32","SCNx64","SCNx8","SCNxFAST16","SCNxFAST32","SCNxFAST64","SCNxFAST8","SCNxLEAST16","SCNxLEAST32","SCNxLEAST64","SCNxLEAST8","SCNxMAX","SCNxPTR","SEEK_CUR","SEEK_END","SEEK_SET","SHRT_MAX","SHRT_MIN","SIGABRT","SIGALRM","SIGBUS","SIGCHLD","SIGCLD","SIGCONT","SIGEMT","SIGFPE","SIGHUP","SIGILL","SIGINFO","SIGINT","SIGIO","SIGIOT","SIGKILL","SIGLOST","SIGPIPE","SIGPOLL","SIGPROF","SIGPWR","SIGQUIT","SIGSEGV","SIGSTKFLT","SIGSTOP","SIGSYS","SIGTERM","SIGTRAP","SIGTSTP","SIGTTIN","SIGTTOU","SIGUNUSED","SIGURG","SIGUSR1","SIGUSR2","SIGVTALRM","SIGWINCH","SIGXCPU","SIGXFSZ","SIG_ATOMIC_MAX","SIG_ATOMIC_MIN","SIG_DFL","SIG_ERR","SIG_IGN","SIZE_MAX"};
-static char const *const syntax_keywords_c_T[5] = {"TIME_UTC","TMP_MAX","TMP_MAX_S","TSS_DTOR_ITERATIONS"};
-static char const *const syntax_keywords_c_U[20] = {"UCHAR_MAX","UINT16_MAX","UINT32_MAX","UINT64_MAX","UINT8_MAX","UINTMAX_MAX","UINTPTR_MAX","UINT_FAST16_MAX","UINT_FAST32_MAX","UINT_FAST64_MAX","UINT_FAST8_MAX","UINT_LEAST16_MAX","UINT_LEAST32_MAX","UINT_LEAST64_MAX","UINT_LEAST8_MAX","UINT_MAX","ULLONG_MAX","ULONG_MAX","USHRT_MAX"};
-static char const *const syntax_keywords_c_W[6] = {"WCHAR_MAX","WCHAR_MIN","WEOF","WINT_MAX","WINT_MIN"};
-static char const *const syntax_keywords_c__[14] = {"_Alignas","_Alignof","_Atomic","_Bool","_Complex","_Generic","_IOFBF","_IOLBF","_IONBF","_Imaginary","_Noreturn","_Static_assert","_Thread_local"};
-static char const *const syntax_keywords_c_a[43] = {"alignas","alignof","atomic_address","atomic_bool","atomic_char","atomic_char16_t","atomic_char32_t","atomic_flag","atomic_int","atomic_int_fast16_t","atomic_int_fast32_t","atomic_int_fast64_t","atomic_int_fast8_t","atomic_int_least16_t","atomic_int_least32_t","atomic_int_least64_t","atomic_int_least8_t","atomic_intmax_t","atomic_intptr_t","atomic_llong","atomic_long","atomic_ptrdiff_t","atomic_schar","atomic_short","atomic_size_t","atomic_uchar","atomic_uint","atomic_uint_fast16_t","atomic_uint_fast32_t","atomic_uint_fast64_t","atomic_uint_fast8_t","atomic_uint_least16_t","atomic_uint_least32_t","atomic_uint_least64_t","atomic_uint_least8_t","atomic_uintmax_t","atomic_uintptr_t","atomic_ullong","atomic_ulong","atomic_ushort","atomic_wchar_t","auto"};
-static char const *const syntax_keywords_c_b[3] = {"bool","break"};
-static char const *const syntax_keywords_c_c[12] = {"case","char","char16_t","char32_t","char8_t","clock_t","cnd_t","complex","const","constraint_handler_t","continue"};
-static char const *const syntax_keywords_c_d[6] = {"default","div_t","do","double","double_t"};
-static char const *const syntax_keywords_c_e[5] = {"else","enum","errno_t","extern"};
-static char const *const syntax_keywords_c_f[8] = {"false","fenv_t","fexcept_t","float","float_t","for","fpos_t"};
-static char const *const syntax_keywords_c_g[2] = {"goto"};
-static char const *const syntax_keywords_c_i[11] = {"if","imaxdiv_t","inline","int","int16_t","int32_t","int64_t","int8_t","intmax_t","intptr_t"};
-static char const *const syntax_keywords_c_j[2] = {"jmp_buf"};
-static char const *const syntax_keywords_c_l[4] = {"ldiv_t","lldiv_t","long"};
-static char const *const syntax_keywords_c_m[16] = {"math_errhandling","max_align_t","mbstate_t","memory_order","memory_order_acq_rel","memory_order_acquire","memory_order_consume","memory_order_relaxed","memory_order_release","memory_order_seq_cst","mtx_plain","mtx_recursive","mtx_t","mtx_timed","mtx_try"};
-static char const *const syntax_keywords_c_n[2] = {"noreturn"};
-static char const *const syntax_keywords_c_o[3] = {"offsetof","once_flag"};
-static char const *const syntax_keywords_c_p[2] = {"ptrdiff_t"};
-static char const *const syntax_keywords_c_r[5] = {"register","restrict","return","rsize_t"};
-static char const *const syntax_keywords_c_s[13] = {"short","sig_atomic_t","signed","size_t","sizeof","static","static_assert","stderr","stdin","stdout","struct","switch"};
-static char const *const syntax_keywords_c_t[13] = {"thrd_busy","thrd_error","thrd_nomem","thrd_start_t","thrd_success","thrd_t","thrd_timeout","time_t","true","tss_dtor_t","tss_t","typedef"};
-static char const *const syntax_keywords_c_u[9] = {"uint16_t","uint32_t","uint64_t","uint8_t","uintmax_t","uintptr_t","union","unsigned"};
-static char const *const syntax_keywords_c_v[4] = {"va_list","void","volatile"};
-static char const *const syntax_keywords_c_w[6] = {"wchar_t","wctrans_t","wctype_t","while","wint_t"};
-static char const *const syntax_keywords_c_x[2] = {"xtime"};
-static char const *const *const syntax_all_keywords_c[] = {
+typedef struct {
+ char const *str;
+ SyntaxCharType type;
+} Keyword;
+
+static Keyword const syntax_keywords_c_A[11] = {{"ATOMIC_ADDRESS_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_CHAR16_T_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_CHAR32_T_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_CHAR_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_FLAG_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_INT_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_LLONG_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_LONG_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_SHORT_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_WCHAR_T_LOCK_FREE", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_B[2] = {{"BUFSIZ", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_C[5] = {{"CHAR_BIT", SYNTAX_CONSTANT},{"CHAR_MAX", SYNTAX_CONSTANT},{"CHAR_MIN", SYNTAX_CONSTANT},{"CLOCKS_PER_SEC", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_D[12] = {{"DBL_DIG", SYNTAX_CONSTANT},{"DBL_EPSILON", SYNTAX_CONSTANT},{"DBL_HAS_SUBNORM", SYNTAX_CONSTANT},{"DBL_MANT_DIG", SYNTAX_CONSTANT},{"DBL_MAX", SYNTAX_CONSTANT},{"DBL_MAX_10_EXP", SYNTAX_CONSTANT},{"DBL_MAX_EXP", SYNTAX_CONSTANT},{"DBL_MIN", SYNTAX_CONSTANT},{"DBL_MIN_EXP", SYNTAX_CONSTANT},{"DBL_TRUE_MIN", SYNTAX_CONSTANT},{"DECIMAL_DIG", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_E[128] = {{"E2BIG", SYNTAX_CONSTANT},{"EACCES", SYNTAX_CONSTANT},{"EADDRINUSE", SYNTAX_CONSTANT},{"EADDRNOTAVAIL", SYNTAX_CONSTANT},{"EADV", SYNTAX_CONSTANT},{"EAFNOSUPPORT", SYNTAX_CONSTANT},{"EAGAIN", SYNTAX_CONSTANT},{"EALREADY", SYNTAX_CONSTANT},{"EBADE", SYNTAX_CONSTANT},{"EBADF", SYNTAX_CONSTANT},{"EBADFD", SYNTAX_CONSTANT},{"EBADMSG", SYNTAX_CONSTANT},{"EBADR", SYNTAX_CONSTANT},{"EBADRQC", SYNTAX_CONSTANT},{"EBADSLT", SYNTAX_CONSTANT},{"EBFONT", SYNTAX_CONSTANT},{"EBUSY", SYNTAX_CONSTANT},{"ECHILD", SYNTAX_CONSTANT},{"ECHRNG", SYNTAX_CONSTANT},{"ECOMM", SYNTAX_CONSTANT},{"ECONNABORTED", SYNTAX_CONSTANT},{"ECONNREFUSED", SYNTAX_CONSTANT},{"ECONNRESET", SYNTAX_CONSTANT},{"EDEADLK", SYNTAX_CONSTANT},{"EDEADLOCK", SYNTAX_CONSTANT},{"EDESTADDRREQ", SYNTAX_CONSTANT},{"EDOM", SYNTAX_CONSTANT},{"EDOTDOT", SYNTAX_CONSTANT},{"EDQUOT", SYNTAX_CONSTANT},{"EEXIST", SYNTAX_CONSTANT},{"EFAULT", SYNTAX_CONSTANT},{"EFBIG", SYNTAX_CONSTANT},{"EHOSTDOWN", SYNTAX_CONSTANT},{"EHOSTUNREACH", SYNTAX_CONSTANT},{"EIDRM", SYNTAX_CONSTANT},{"EILSEQ", SYNTAX_CONSTANT},{"EINPROGRESS", SYNTAX_CONSTANT},{"EINTR", SYNTAX_CONSTANT},{"EINVAL", SYNTAX_CONSTANT},{"EIO", SYNTAX_CONSTANT},{"EISCONN", SYNTAX_CONSTANT},{"EISDIR", SYNTAX_CONSTANT},{"EISNAM", SYNTAX_CONSTANT},{"EL2HLT", SYNTAX_CONSTANT},{"EL2NSYNC", SYNTAX_CONSTANT},{"EL3HLT", SYNTAX_CONSTANT},{"EL3RST", SYNTAX_CONSTANT},{"ELIBACC", SYNTAX_CONSTANT},{"ELIBBAD", SYNTAX_CONSTANT},{"ELIBEXEC", SYNTAX_CONSTANT},{"ELIBMAX", SYNTAX_CONSTANT},{"ELIBSCN", SYNTAX_CONSTANT},{"ELNRNG", SYNTAX_CONSTANT},{"ELOOP", SYNTAX_CONSTANT},{"EMEDIUMTYPE", SYNTAX_CONSTANT},{"EMFILE", SYNTAX_CONSTANT},{"EMLINK", SYNTAX_CONSTANT},{"EMSGSIZE", SYNTAX_CONSTANT},{"EMULTIHOP", SYNTAX_CONSTANT},{"ENAMETOOLONG", SYNTAX_CONSTANT},{"ENAVAIL", SYNTAX_CONSTANT},{"ENETDOWN", SYNTAX_CONSTANT},{"ENETRESET", SYNTAX_CONSTANT},{"ENETUNREACH", SYNTAX_CONSTANT},{"ENFILE", SYNTAX_CONSTANT},{"ENOANO", SYNTAX_CONSTANT},{"ENOBUFS", SYNTAX_CONSTANT},{"ENOCSI", SYNTAX_CONSTANT},{"ENODATA", SYNTAX_CONSTANT},{"ENODEV", SYNTAX_CONSTANT},{"ENOENT", SYNTAX_CONSTANT},{"ENOEXEC", SYNTAX_CONSTANT},{"ENOLCK", SYNTAX_CONSTANT},{"ENOLINK", SYNTAX_CONSTANT},{"ENOMEDIUM", SYNTAX_CONSTANT},{"ENOMEM", SYNTAX_CONSTANT},{"ENOMSG", SYNTAX_CONSTANT},{"ENONET", SYNTAX_CONSTANT},{"ENOPKG", SYNTAX_CONSTANT},{"ENOPROTOOPT", SYNTAX_CONSTANT},{"ENOSPC", SYNTAX_CONSTANT},{"ENOSR", SYNTAX_CONSTANT},{"ENOSTR", SYNTAX_CONSTANT},{"ENOSYS", SYNTAX_CONSTANT},{"ENOTBLK", SYNTAX_CONSTANT},{"ENOTCONN", SYNTAX_CONSTANT},{"ENOTDIR", SYNTAX_CONSTANT},{"ENOTEMPTY", SYNTAX_CONSTANT},{"ENOTNAM", SYNTAX_CONSTANT},{"ENOTSOCK", SYNTAX_CONSTANT},{"ENOTTY", SYNTAX_CONSTANT},{"ENOTUNIQ", SYNTAX_CONSTANT},{"ENXIO", SYNTAX_CONSTANT},{"EOF", SYNTAX_CONSTANT},{"EOPNOTSUPP", SYNTAX_CONSTANT},{"EOVERFLOW", SYNTAX_CONSTANT},{"EPERM", SYNTAX_CONSTANT},{"EPFNOSUPPORT", SYNTAX_CONSTANT},{"EPIPE", SYNTAX_CONSTANT},{"EPROTO", SYNTAX_CONSTANT},{"EPROTONOSUPPORT", SYNTAX_CONSTANT},{"EPROTOTYPE", SYNTAX_CONSTANT},{"ERANGE", SYNTAX_CONSTANT},{"EREMCHG", SYNTAX_CONSTANT},{"EREMOTE", SYNTAX_CONSTANT},{"EREMOTEIO", SYNTAX_CONSTANT},{"ERESTART", SYNTAX_CONSTANT},{"EROFS", SYNTAX_CONSTANT},{"ESHUTDOWN", SYNTAX_CONSTANT},{"ESOCKTNOSUPPORT", SYNTAX_CONSTANT},{"ESPIPE", SYNTAX_CONSTANT},{"ESRCH", SYNTAX_CONSTANT},{"ESRMNT", SYNTAX_CONSTANT},{"ESTALE", SYNTAX_CONSTANT},{"ESTRPIPE", SYNTAX_CONSTANT},{"ETIME", SYNTAX_CONSTANT},{"ETIMEDOUT", SYNTAX_CONSTANT},{"ETOOMANYREFS", SYNTAX_CONSTANT},{"ETXTBSY", SYNTAX_CONSTANT},{"EUCLEAN", SYNTAX_CONSTANT},{"EUNATCH", SYNTAX_CONSTANT},{"EUSERS", SYNTAX_CONSTANT},{"EWOULDBLOCK", SYNTAX_CONSTANT},{"EXDEV", SYNTAX_CONSTANT},{"EXFULL", SYNTAX_CONSTANT},{"EXIT_FAILURE", SYNTAX_CONSTANT},{"EXIT_SUCCESS", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_F[39] = {{"FE_ALL_EXCEPT", SYNTAX_CONSTANT},{"FE_DFL_ENV", SYNTAX_CONSTANT},{"FE_DIVBYZERO", SYNTAX_CONSTANT},{"FE_DOWNWARD", SYNTAX_CONSTANT},{"FE_INEXACT", SYNTAX_CONSTANT},{"FE_INVALID", SYNTAX_CONSTANT},{"FE_OVERFLOW", SYNTAX_CONSTANT},{"FE_TONEAREST", SYNTAX_CONSTANT},{"FE_TOWARDZERO", SYNTAX_CONSTANT},{"FE_UNDERFLOW", SYNTAX_CONSTANT},{"FE_UPWARD", SYNTAX_CONSTANT},{"FILE", SYNTAX_CONSTANT},{"FILENAME_MAX", SYNTAX_CONSTANT},{"FLT_DECIMAL_DIG", SYNTAX_CONSTANT},{"FLT_DIG", SYNTAX_CONSTANT},{"FLT_EVAL_METHOD", SYNTAX_CONSTANT},{"FLT_HAS_SUBNORM", SYNTAX_CONSTANT},{"FLT_MANT_DIG", SYNTAX_CONSTANT},{"FLT_MAX", SYNTAX_CONSTANT},{"FLT_MAX_10_EXP", SYNTAX_CONSTANT},{"FLT_MAX_EXP", SYNTAX_CONSTANT},{"FLT_MIN", SYNTAX_CONSTANT},{"FLT_MIN_10_EXP", SYNTAX_CONSTANT},{"FLT_MIN_EXP", SYNTAX_CONSTANT},{"FLT_RADIX", SYNTAX_CONSTANT},{"FLT_ROUNDS", SYNTAX_CONSTANT},{"FLT_TRUE_MIN", SYNTAX_CONSTANT},{"FOPEN_MAX", SYNTAX_CONSTANT},{"FP_FAST_FMA", SYNTAX_CONSTANT},{"FP_FAST_FMAF", SYNTAX_CONSTANT},{"FP_FAST_FMAL", SYNTAX_CONSTANT},{"FP_ILOGB0", SYNTAX_CONSTANT},{"FP_ILOGBNAN", SYNTAX_CONSTANT},{"FP_INFINITE", SYNTAX_CONSTANT},{"FP_NAN", SYNTAX_CONSTANT},{"FP_NORMAL", SYNTAX_CONSTANT},{"FP_SUBNORMAL", SYNTAX_CONSTANT},{"FP_ZERO", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_H[4] = {{"HUGE_VAL", SYNTAX_CONSTANT},{"HUGE_VALF", SYNTAX_CONSTANT},{"HUGE_VALL", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_I[33] = {{"I", SYNTAX_CONSTANT},{"INFINITY", SYNTAX_CONSTANT},{"INT16_MAX", SYNTAX_CONSTANT},{"INT16_MIN", SYNTAX_CONSTANT},{"INT32_MAX", SYNTAX_CONSTANT},{"INT32_MIN", SYNTAX_CONSTANT},{"INT64_MAX", SYNTAX_CONSTANT},{"INT64_MIN", SYNTAX_CONSTANT},{"INT8_MAX", SYNTAX_CONSTANT},{"INT8_MIN", SYNTAX_CONSTANT},{"INTMAX_MAX", SYNTAX_CONSTANT},{"INTMAX_MIN", SYNTAX_CONSTANT},{"INTPTR_MAX", SYNTAX_CONSTANT},{"INTPTR_MIN", SYNTAX_CONSTANT},{"INT_FAST16_MAX", SYNTAX_CONSTANT},{"INT_FAST16_MIN", SYNTAX_CONSTANT},{"INT_FAST32_MAX", SYNTAX_CONSTANT},{"INT_FAST32_MIN", SYNTAX_CONSTANT},{"INT_FAST64_MAX", SYNTAX_CONSTANT},{"INT_FAST64_MIN", SYNTAX_CONSTANT},{"INT_FAST8_MAX", SYNTAX_CONSTANT},{"INT_FAST8_MIN", SYNTAX_CONSTANT},{"INT_LEAST16_MAX", SYNTAX_CONSTANT},{"INT_LEAST16_MIN", SYNTAX_CONSTANT},{"INT_LEAST32_MAX", SYNTAX_CONSTANT},{"INT_LEAST32_MIN", SYNTAX_CONSTANT},{"INT_LEAST64_MAX", SYNTAX_CONSTANT},{"INT_LEAST64_MIN", SYNTAX_CONSTANT},{"INT_LEAST8_MAX", SYNTAX_CONSTANT},{"INT_LEAST8_MIN", SYNTAX_CONSTANT},{"INT_MAX", SYNTAX_CONSTANT},{"INT_MIN", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_L[23] = {{"LC_ALL", SYNTAX_CONSTANT},{"LC_COLLATE", SYNTAX_CONSTANT},{"LC_CTYPE", SYNTAX_CONSTANT},{"LC_MONETARY", SYNTAX_CONSTANT},{"LC_NUMERIC", SYNTAX_CONSTANT},{"LC_TIME", SYNTAX_CONSTANT},{"LDBL_DECIMAL_DIG", SYNTAX_CONSTANT},{"LDBL_DIG", SYNTAX_CONSTANT},{"LDBL_EPSILON", SYNTAX_CONSTANT},{"LDBL_MANT_DIG", SYNTAX_CONSTANT},{"LDBL_MAX", SYNTAX_CONSTANT},{"LDBL_MAX_10_EXP", SYNTAX_CONSTANT},{"LDBL_MAX_EXP", SYNTAX_CONSTANT},{"LDBL_MIN", SYNTAX_CONSTANT},{"LDBL_MIN_10_EXP", SYNTAX_CONSTANT},{"LDBL_MIN_EXP", SYNTAX_CONSTANT},{"LDBL_TRUE_MIN", SYNTAX_CONSTANT},{"LLONG_MAX", SYNTAX_CONSTANT},{"LLONG_MIN", SYNTAX_CONSTANT},{"LONG_MAX", SYNTAX_CONSTANT},{"LONG_MIN", SYNTAX_CONSTANT},{"L_tmpnam", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_M[5] = {{"MATH_ERREXCEPT", SYNTAX_CONSTANT},{"MATH_ERRNO", SYNTAX_CONSTANT},{"MB_CUR_MAX", SYNTAX_CONSTANT},{"MB_LEN_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_N[4] = {{"NAN", SYNTAX_CONSTANT},{"NDEBUG", SYNTAX_CONSTANT},{"NULL", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_O[2] = {{"ONCE_FLAG_INIT", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_P[87] = {{"PRIX16", SYNTAX_CONSTANT},{"PRIX32", SYNTAX_CONSTANT},{"PRIX64", SYNTAX_CONSTANT},{"PRIX8", SYNTAX_CONSTANT},{"PRIXFAST16", SYNTAX_CONSTANT},{"PRIXFAST32", SYNTAX_CONSTANT},{"PRIXFAST64", SYNTAX_CONSTANT},{"PRIXFAST8", SYNTAX_CONSTANT},{"PRIXLEAST16", SYNTAX_CONSTANT},{"PRIXLEAST32", SYNTAX_CONSTANT},{"PRIXLEAST64", SYNTAX_CONSTANT},{"PRIXLEAST8", SYNTAX_CONSTANT},{"PRIXMAX", SYNTAX_CONSTANT},{"PRIXPTR", SYNTAX_CONSTANT},{"PRId16", SYNTAX_CONSTANT},{"PRId32", SYNTAX_CONSTANT},{"PRId64", SYNTAX_CONSTANT},{"PRId8", SYNTAX_CONSTANT},{"PRIdFAST16", SYNTAX_CONSTANT},{"PRIdFAST32", SYNTAX_CONSTANT},{"PRIdFAST64", SYNTAX_CONSTANT},{"PRIdFAST8", SYNTAX_CONSTANT},{"PRIdLEAST16", SYNTAX_CONSTANT},{"PRIdLEAST32", SYNTAX_CONSTANT},{"PRIdLEAST64", SYNTAX_CONSTANT},{"PRIdLEAST8", SYNTAX_CONSTANT},{"PRIdMAX", SYNTAX_CONSTANT},{"PRIdPTR", SYNTAX_CONSTANT},{"PRIi16", SYNTAX_CONSTANT},{"PRIi32", SYNTAX_CONSTANT},{"PRIi64", SYNTAX_CONSTANT},{"PRIi8", SYNTAX_CONSTANT},{"PRIiFAST16", SYNTAX_CONSTANT},{"PRIiFAST32", SYNTAX_CONSTANT},{"PRIiFAST64", SYNTAX_CONSTANT},{"PRIiFAST8", SYNTAX_CONSTANT},{"PRIiLEAST16", SYNTAX_CONSTANT},{"PRIiLEAST32", SYNTAX_CONSTANT},{"PRIiLEAST64", SYNTAX_CONSTANT},{"PRIiLEAST8", SYNTAX_CONSTANT},{"PRIiMAX", SYNTAX_CONSTANT},{"PRIiPTR", SYNTAX_CONSTANT},{"PRIo16", SYNTAX_CONSTANT},{"PRIo32", SYNTAX_CONSTANT},{"PRIo64", SYNTAX_CONSTANT},{"PRIo8", SYNTAX_CONSTANT},{"PRIoFAST16", SYNTAX_CONSTANT},{"PRIoFAST32", SYNTAX_CONSTANT},{"PRIoFAST64", SYNTAX_CONSTANT},{"PRIoFAST8", SYNTAX_CONSTANT},{"PRIoLEAST16", SYNTAX_CONSTANT},{"PRIoLEAST32", SYNTAX_CONSTANT},{"PRIoLEAST64", SYNTAX_CONSTANT},{"PRIoLEAST8", SYNTAX_CONSTANT},{"PRIoMAX", SYNTAX_CONSTANT},{"PRIoPTR", SYNTAX_CONSTANT},{"PRIu16", SYNTAX_CONSTANT},{"PRIu32", SYNTAX_CONSTANT},{"PRIu64", SYNTAX_CONSTANT},{"PRIu8", SYNTAX_CONSTANT},{"PRIuFAST16", SYNTAX_CONSTANT},{"PRIuFAST32", SYNTAX_CONSTANT},{"PRIuFAST64", SYNTAX_CONSTANT},{"PRIuFAST8", SYNTAX_CONSTANT},{"PRIuLEAST16", SYNTAX_CONSTANT},{"PRIuLEAST32", SYNTAX_CONSTANT},{"PRIuLEAST64", SYNTAX_CONSTANT},{"PRIuLEAST8", SYNTAX_CONSTANT},{"PRIuMAX", SYNTAX_CONSTANT},{"PRIuPTR", SYNTAX_CONSTANT},{"PRIx16", SYNTAX_CONSTANT},{"PRIx32", SYNTAX_CONSTANT},{"PRIx64", SYNTAX_CONSTANT},{"PRIx8", SYNTAX_CONSTANT},{"PRIxFAST16", SYNTAX_CONSTANT},{"PRIxFAST32", SYNTAX_CONSTANT},{"PRIxFAST64", SYNTAX_CONSTANT},{"PRIxFAST8", SYNTAX_CONSTANT},{"PRIxLEAST16", SYNTAX_CONSTANT},{"PRIxLEAST32", SYNTAX_CONSTANT},{"PRIxLEAST64", SYNTAX_CONSTANT},{"PRIxLEAST8", SYNTAX_CONSTANT},{"PRIxMAX", SYNTAX_CONSTANT},{"PRIxPTR", SYNTAX_CONSTANT},{"PTRDIFF_MAX", SYNTAX_CONSTANT},{"PTRDIFF_MIN", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_R[2] = {{"RSIZE_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_S[122] = {{"SCHAR_MAX", SYNTAX_CONSTANT},{"SCHAR_MIN", SYNTAX_CONSTANT},{"SCNd16", SYNTAX_CONSTANT},{"SCNd32", SYNTAX_CONSTANT},{"SCNd64", SYNTAX_CONSTANT},{"SCNd8", SYNTAX_CONSTANT},{"SCNdFAST16", SYNTAX_CONSTANT},{"SCNdFAST32", SYNTAX_CONSTANT},{"SCNdFAST64", SYNTAX_CONSTANT},{"SCNdFAST8", SYNTAX_CONSTANT},{"SCNdLEAST16", SYNTAX_CONSTANT},{"SCNdLEAST32", SYNTAX_CONSTANT},{"SCNdLEAST64", SYNTAX_CONSTANT},{"SCNdLEAST8", SYNTAX_CONSTANT},{"SCNdMAX", SYNTAX_CONSTANT},{"SCNdPTR", SYNTAX_CONSTANT},{"SCNi16", SYNTAX_CONSTANT},{"SCNi32", SYNTAX_CONSTANT},{"SCNi64", SYNTAX_CONSTANT},{"SCNi8", SYNTAX_CONSTANT},{"SCNiFAST16", SYNTAX_CONSTANT},{"SCNiFAST32", SYNTAX_CONSTANT},{"SCNiFAST64", SYNTAX_CONSTANT},{"SCNiFAST8", SYNTAX_CONSTANT},{"SCNiLEAST16", SYNTAX_CONSTANT},{"SCNiLEAST32", SYNTAX_CONSTANT},{"SCNiLEAST64", SYNTAX_CONSTANT},{"SCNiLEAST8", SYNTAX_CONSTANT},{"SCNiMAX", SYNTAX_CONSTANT},{"SCNiPTR", SYNTAX_CONSTANT},{"SCNo16", SYNTAX_CONSTANT},{"SCNo32", SYNTAX_CONSTANT},{"SCNo64", SYNTAX_CONSTANT},{"SCNo8", SYNTAX_CONSTANT},{"SCNoFAST16", SYNTAX_CONSTANT},{"SCNoFAST32", SYNTAX_CONSTANT},{"SCNoFAST64", SYNTAX_CONSTANT},{"SCNoFAST8", SYNTAX_CONSTANT},{"SCNoLEAST16", SYNTAX_CONSTANT},{"SCNoLEAST32", SYNTAX_CONSTANT},{"SCNoLEAST64", SYNTAX_CONSTANT},{"SCNoLEAST8", SYNTAX_CONSTANT},{"SCNoMAX", SYNTAX_CONSTANT},{"SCNoPTR", SYNTAX_CONSTANT},{"SCNu16", SYNTAX_CONSTANT},{"SCNu32", SYNTAX_CONSTANT},{"SCNu64", SYNTAX_CONSTANT},{"SCNu8", SYNTAX_CONSTANT},{"SCNuFAST16", SYNTAX_CONSTANT},{"SCNuFAST32", SYNTAX_CONSTANT},{"SCNuFAST64", SYNTAX_CONSTANT},{"SCNuFAST8", SYNTAX_CONSTANT},{"SCNuLEAST16", SYNTAX_CONSTANT},{"SCNuLEAST32", SYNTAX_CONSTANT},{"SCNuLEAST64", SYNTAX_CONSTANT},{"SCNuLEAST8", SYNTAX_CONSTANT},{"SCNuMAX", SYNTAX_CONSTANT},{"SCNuPTR", SYNTAX_CONSTANT},{"SCNx16", SYNTAX_CONSTANT},{"SCNx32", SYNTAX_CONSTANT},{"SCNx64", SYNTAX_CONSTANT},{"SCNx8", SYNTAX_CONSTANT},{"SCNxFAST16", SYNTAX_CONSTANT},{"SCNxFAST32", SYNTAX_CONSTANT},{"SCNxFAST64", SYNTAX_CONSTANT},{"SCNxFAST8", SYNTAX_CONSTANT},{"SCNxLEAST16", SYNTAX_CONSTANT},{"SCNxLEAST32", SYNTAX_CONSTANT},{"SCNxLEAST64", SYNTAX_CONSTANT},{"SCNxLEAST8", SYNTAX_CONSTANT},{"SCNxMAX", SYNTAX_CONSTANT},{"SCNxPTR", SYNTAX_CONSTANT},{"SEEK_CUR", SYNTAX_CONSTANT},{"SEEK_END", SYNTAX_CONSTANT},{"SEEK_SET", SYNTAX_CONSTANT},{"SHRT_MAX", SYNTAX_CONSTANT},{"SHRT_MIN", SYNTAX_CONSTANT},{"SIGABRT", SYNTAX_CONSTANT},{"SIGALRM", SYNTAX_CONSTANT},{"SIGBUS", SYNTAX_CONSTANT},{"SIGCHLD", SYNTAX_CONSTANT},{"SIGCLD", SYNTAX_CONSTANT},{"SIGCONT", SYNTAX_CONSTANT},{"SIGEMT", SYNTAX_CONSTANT},{"SIGFPE", SYNTAX_CONSTANT},{"SIGHUP", SYNTAX_CONSTANT},{"SIGILL", SYNTAX_CONSTANT},{"SIGINFO", SYNTAX_CONSTANT},{"SIGINT", SYNTAX_CONSTANT},{"SIGIO", SYNTAX_CONSTANT},{"SIGIOT", SYNTAX_CONSTANT},{"SIGKILL", SYNTAX_CONSTANT},{"SIGLOST", SYNTAX_CONSTANT},{"SIGPIPE", SYNTAX_CONSTANT},{"SIGPOLL", SYNTAX_CONSTANT},{"SIGPROF", SYNTAX_CONSTANT},{"SIGPWR", SYNTAX_CONSTANT},{"SIGQUIT", SYNTAX_CONSTANT},{"SIGSEGV", SYNTAX_CONSTANT},{"SIGSTKFLT", SYNTAX_CONSTANT},{"SIGSTOP", SYNTAX_CONSTANT},{"SIGSYS", SYNTAX_CONSTANT},{"SIGTERM", SYNTAX_CONSTANT},{"SIGTRAP", SYNTAX_CONSTANT},{"SIGTSTP", SYNTAX_CONSTANT},{"SIGTTIN", SYNTAX_CONSTANT},{"SIGTTOU", SYNTAX_CONSTANT},{"SIGUNUSED", SYNTAX_CONSTANT},{"SIGURG", SYNTAX_CONSTANT},{"SIGUSR1", SYNTAX_CONSTANT},{"SIGUSR2", SYNTAX_CONSTANT},{"SIGVTALRM", SYNTAX_CONSTANT},{"SIGWINCH", SYNTAX_CONSTANT},{"SIGXCPU", SYNTAX_CONSTANT},{"SIGXFSZ", SYNTAX_CONSTANT},{"SIG_ATOMIC_MAX", SYNTAX_CONSTANT},{"SIG_ATOMIC_MIN", SYNTAX_CONSTANT},{"SIG_DFL", SYNTAX_CONSTANT},{"SIG_ERR", SYNTAX_CONSTANT},{"SIG_IGN", SYNTAX_CONSTANT},{"SIZE_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_T[5] = {{"TIME_UTC", SYNTAX_CONSTANT},{"TMP_MAX", SYNTAX_CONSTANT},{"TMP_MAX_S", SYNTAX_CONSTANT},{"TSS_DTOR_ITERATIONS", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_U[20] = {{"UCHAR_MAX", SYNTAX_CONSTANT},{"UINT16_MAX", SYNTAX_CONSTANT},{"UINT32_MAX", SYNTAX_CONSTANT},{"UINT64_MAX", SYNTAX_CONSTANT},{"UINT8_MAX", SYNTAX_CONSTANT},{"UINTMAX_MAX", SYNTAX_CONSTANT},{"UINTPTR_MAX", SYNTAX_CONSTANT},{"UINT_FAST16_MAX", SYNTAX_CONSTANT},{"UINT_FAST32_MAX", SYNTAX_CONSTANT},{"UINT_FAST64_MAX", SYNTAX_CONSTANT},{"UINT_FAST8_MAX", SYNTAX_CONSTANT},{"UINT_LEAST16_MAX", SYNTAX_CONSTANT},{"UINT_LEAST32_MAX", SYNTAX_CONSTANT},{"UINT_LEAST64_MAX", SYNTAX_CONSTANT},{"UINT_LEAST8_MAX", SYNTAX_CONSTANT},{"UINT_MAX", SYNTAX_CONSTANT},{"ULLONG_MAX", SYNTAX_CONSTANT},{"ULONG_MAX", SYNTAX_CONSTANT},{"USHRT_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_W[6] = {{"WCHAR_MAX", SYNTAX_CONSTANT},{"WCHAR_MIN", SYNTAX_CONSTANT},{"WEOF", SYNTAX_CONSTANT},{"WINT_MAX", SYNTAX_CONSTANT},{"WINT_MIN", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c__[14] = {{"_Alignas", SYNTAX_KEYWORD},{"_Alignof", SYNTAX_KEYWORD},{"_Atomic", SYNTAX_KEYWORD},{"_Bool", SYNTAX_KEYWORD},{"_Complex", SYNTAX_KEYWORD},{"_Generic", SYNTAX_KEYWORD},{"_Imaginary", SYNTAX_KEYWORD},{"_Noreturn", SYNTAX_KEYWORD},{"_Static_assert", SYNTAX_KEYWORD},{"_Thread_local", SYNTAX_KEYWORD},{"_IOFBF", SYNTAX_CONSTANT},{"_IOLBF", SYNTAX_CONSTANT},{"_IONBF", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_c_a[43] = {{"auto", SYNTAX_KEYWORD},{"alignas", SYNTAX_BUILTIN},{"alignof", SYNTAX_BUILTIN},{"atomic_address", SYNTAX_BUILTIN},{"atomic_bool", SYNTAX_BUILTIN},{"atomic_char", SYNTAX_BUILTIN},{"atomic_char16_t", SYNTAX_BUILTIN},{"atomic_char32_t", SYNTAX_BUILTIN},{"atomic_flag", SYNTAX_BUILTIN},{"atomic_int", SYNTAX_BUILTIN},{"atomic_int_fast16_t", SYNTAX_BUILTIN},{"atomic_int_fast32_t", SYNTAX_BUILTIN},{"atomic_int_fast64_t", SYNTAX_BUILTIN},{"atomic_int_fast8_t", SYNTAX_BUILTIN},{"atomic_int_least16_t", SYNTAX_BUILTIN},{"atomic_int_least32_t", SYNTAX_BUILTIN},{"atomic_int_least64_t", SYNTAX_BUILTIN},{"atomic_int_least8_t", SYNTAX_BUILTIN},{"atomic_intmax_t", SYNTAX_BUILTIN},{"atomic_intptr_t", SYNTAX_BUILTIN},{"atomic_llong", SYNTAX_BUILTIN},{"atomic_long", SYNTAX_BUILTIN},{"atomic_ptrdiff_t", SYNTAX_BUILTIN},{"atomic_schar", SYNTAX_BUILTIN},{"atomic_short", SYNTAX_BUILTIN},{"atomic_size_t", SYNTAX_BUILTIN},{"atomic_uchar", SYNTAX_BUILTIN},{"atomic_uint", SYNTAX_BUILTIN},{"atomic_uint_fast16_t", SYNTAX_BUILTIN},{"atomic_uint_fast32_t", SYNTAX_BUILTIN},{"atomic_uint_fast64_t", SYNTAX_BUILTIN},{"atomic_uint_fast8_t", SYNTAX_BUILTIN},{"atomic_uint_least16_t", SYNTAX_BUILTIN},{"atomic_uint_least32_t", SYNTAX_BUILTIN},{"atomic_uint_least64_t", SYNTAX_BUILTIN},{"atomic_uint_least8_t", SYNTAX_BUILTIN},{"atomic_uintmax_t", SYNTAX_BUILTIN},{"atomic_uintptr_t", SYNTAX_BUILTIN},{"atomic_ullong", SYNTAX_BUILTIN},{"atomic_ulong", SYNTAX_BUILTIN},{"atomic_ushort", SYNTAX_BUILTIN},{"atomic_wchar_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_b[3] = {{"break", SYNTAX_KEYWORD},{"bool", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_c[12] = {{"case", SYNTAX_KEYWORD},{"char", SYNTAX_KEYWORD},{"const", SYNTAX_KEYWORD},{"continue", SYNTAX_KEYWORD},{"char16_t", SYNTAX_BUILTIN},{"char32_t", SYNTAX_BUILTIN},{"char8_t", SYNTAX_BUILTIN},{"clock_t", SYNTAX_BUILTIN},{"cnd_t", SYNTAX_BUILTIN},{"complex", SYNTAX_BUILTIN},{"constraint_handler_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_d[6] = {{"default", SYNTAX_KEYWORD},{"do", SYNTAX_KEYWORD},{"double", SYNTAX_KEYWORD},{"div_t", SYNTAX_BUILTIN},{"double_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_e[5] = {{"else", SYNTAX_KEYWORD},{"enum", SYNTAX_KEYWORD},{"extern", SYNTAX_KEYWORD},{"errno_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_f[8] = {{"float", SYNTAX_KEYWORD},{"for", SYNTAX_KEYWORD},{"false", SYNTAX_CONSTANT},{"fpos_t", SYNTAX_CONSTANT},{"fenv_t", SYNTAX_BUILTIN},{"fexcept_t", SYNTAX_BUILTIN},{"float_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_g[2] = {{"goto", SYNTAX_KEYWORD}};
+static Keyword const syntax_keywords_c_i[19] = {{"if", SYNTAX_KEYWORD},{"inline", SYNTAX_KEYWORD},{"int", SYNTAX_KEYWORD},{"imaxdiv_t", SYNTAX_BUILTIN},{"int16_t", SYNTAX_BUILTIN},{"int32_t", SYNTAX_BUILTIN},{"int64_t", SYNTAX_BUILTIN},{"int8_t", SYNTAX_BUILTIN},{"int_fast16_t", SYNTAX_BUILTIN},{"int_fast32_t", SYNTAX_BUILTIN},{"int_fast64_t", SYNTAX_BUILTIN},{"int_fast8_t", SYNTAX_BUILTIN},{"int_least16_t", SYNTAX_BUILTIN},{"int_least32_t", SYNTAX_BUILTIN},{"int_least64_t", SYNTAX_BUILTIN},{"int_least8_t", SYNTAX_BUILTIN},{"intmax_t", SYNTAX_BUILTIN},{"intptr_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_j[2] = {{"jmp_buf", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_l[4] = {{"long", SYNTAX_KEYWORD},{"ldiv_t", SYNTAX_BUILTIN},{"lldiv_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_m[16] = {{"mtx_plain", SYNTAX_CONSTANT},{"mtx_recursive", SYNTAX_CONSTANT},{"mtx_timed", SYNTAX_CONSTANT},{"mtx_try", SYNTAX_CONSTANT},{"math_errhandling", SYNTAX_BUILTIN},{"max_align_t", SYNTAX_BUILTIN},{"mbstate_t", SYNTAX_BUILTIN},{"memory_order", SYNTAX_BUILTIN},{"memory_order_acq_rel", SYNTAX_BUILTIN},{"memory_order_acquire", SYNTAX_BUILTIN},{"memory_order_consume", SYNTAX_BUILTIN},{"memory_order_relaxed", SYNTAX_BUILTIN},{"memory_order_release", SYNTAX_BUILTIN},{"memory_order_seq_cst", SYNTAX_BUILTIN},{"mtx_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_n[2] = {{"noreturn", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_o[3] = {{"offsetof", SYNTAX_BUILTIN},{"once_flag", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_p[2] = {{"ptrdiff_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_r[5] = {{"register", SYNTAX_KEYWORD},{"restrict", SYNTAX_KEYWORD},{"return", SYNTAX_KEYWORD},{"rsize_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_s[13] = {{"short", SYNTAX_KEYWORD},{"signed", SYNTAX_KEYWORD},{"sizeof", SYNTAX_KEYWORD},{"static", SYNTAX_KEYWORD},{"struct", SYNTAX_KEYWORD},{"switch", SYNTAX_KEYWORD},{"stderr", SYNTAX_CONSTANT},{"stdin", SYNTAX_CONSTANT},{"stdout", SYNTAX_CONSTANT},{"sig_atomic_t", SYNTAX_BUILTIN},{"size_t", SYNTAX_BUILTIN},{"static_assert", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_t[13] = {{"typedef", SYNTAX_KEYWORD},{"thrd_busy", SYNTAX_CONSTANT},{"thrd_error", SYNTAX_CONSTANT},{"thrd_nomem", SYNTAX_CONSTANT},{"thrd_success", SYNTAX_CONSTANT},{"thrd_timeout", SYNTAX_CONSTANT},{"true", SYNTAX_CONSTANT},{"thrd_start_t", SYNTAX_BUILTIN},{"thrd_t", SYNTAX_BUILTIN},{"time_t", SYNTAX_BUILTIN},{"tss_dtor_t", SYNTAX_BUILTIN},{"tss_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_u[17] = {{"union", SYNTAX_KEYWORD},{"unsigned", SYNTAX_KEYWORD},{"uint16_t", SYNTAX_BUILTIN},{"uint32_t", SYNTAX_BUILTIN},{"uint64_t", SYNTAX_BUILTIN},{"uint8_t", SYNTAX_BUILTIN},{"uint_fast16_t", SYNTAX_BUILTIN},{"uint_fast32_t", SYNTAX_BUILTIN},{"uint_fast64_t", SYNTAX_BUILTIN},{"uint_fast8_t", SYNTAX_BUILTIN},{"uint_least16_t", SYNTAX_BUILTIN},{"uint_least32_t", SYNTAX_BUILTIN},{"uint_least64_t", SYNTAX_BUILTIN},{"uint_least8_t", SYNTAX_BUILTIN},{"uintmax_t", SYNTAX_BUILTIN},{"uintptr_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_v[4] = {{"void", SYNTAX_KEYWORD},{"volatile", SYNTAX_KEYWORD},{"va_list", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_w[6] = {{"while", SYNTAX_KEYWORD},{"wchar_t", SYNTAX_BUILTIN},{"wctrans_t", SYNTAX_BUILTIN},{"wctype_t", SYNTAX_BUILTIN},{"wint_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_c_x[2] = {{"xtime", SYNTAX_BUILTIN}};
+static Keyword const *const syntax_all_keywords_c[] = {
['A'] = syntax_keywords_c_A, ['B'] = syntax_keywords_c_B, ['C'] = syntax_keywords_c_C, ['D'] = syntax_keywords_c_D, ['E'] = syntax_keywords_c_E, ['F'] = syntax_keywords_c_F, ['H'] = syntax_keywords_c_H, ['I'] = syntax_keywords_c_I, ['L'] = syntax_keywords_c_L, ['M'] = syntax_keywords_c_M, ['N'] = syntax_keywords_c_N, ['O'] = syntax_keywords_c_O, ['P'] = syntax_keywords_c_P, ['R'] = syntax_keywords_c_R, ['S'] = syntax_keywords_c_S, ['T'] = syntax_keywords_c_T, ['U'] = syntax_keywords_c_U, ['W'] = syntax_keywords_c_W, ['_'] = syntax_keywords_c__, ['a'] = syntax_keywords_c_a, ['b'] = syntax_keywords_c_b, ['c'] = syntax_keywords_c_c, ['d'] = syntax_keywords_c_d, ['e'] = syntax_keywords_c_e, ['f'] = syntax_keywords_c_f, ['g'] = syntax_keywords_c_g, ['i'] = syntax_keywords_c_i, ['j'] = syntax_keywords_c_j, ['l'] = syntax_keywords_c_l, ['m'] = syntax_keywords_c_m, ['n'] = syntax_keywords_c_n, ['o'] = syntax_keywords_c_o, ['p'] = syntax_keywords_c_p, ['r'] = syntax_keywords_c_r, ['s'] = syntax_keywords_c_s, ['t'] = syntax_keywords_c_t, ['u'] = syntax_keywords_c_u, ['v'] = syntax_keywords_c_v, ['w'] = syntax_keywords_c_w, ['x'] = syntax_keywords_c_x
};
-static char const *const syntax_keywords_cpp_a[7] = {"and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept"};
-static char const *const syntax_keywords_cpp_b[3] = {"bitand","bitor"};
-static char const *const syntax_keywords_cpp_c[12] = {"catch","class","co_await","co_return","co_yield","compl","concept","const_cast","consteval","constexpr","constinit"};
-static char const *const syntax_keywords_cpp_d[4] = {"decltype","delete","dynamic_cast"};
-static char const *const syntax_keywords_cpp_e[3] = {"explicit","export"};
-static char const *const syntax_keywords_cpp_f[2] = {"friend"};
-static char const *const syntax_keywords_cpp_m[2] = {"mutable"};
-static char const *const syntax_keywords_cpp_n[7] = {"namespace","new","noexcept","not","not_eq","nullptr"};
-static char const *const syntax_keywords_cpp_o[4] = {"operator","or","or_eq"};
-static char const *const syntax_keywords_cpp_p[4] = {"private","protected","public"};
-static char const *const syntax_keywords_cpp_r[4] = {"reflexpr","reinterpret_cast","requires"};
-static char const *const syntax_keywords_cpp_s[3] = {"static_cast","synchronized"};
-static char const *const syntax_keywords_cpp_t[8] = {"template","this","thread_local","throw","try","typeid","typename"};
-static char const *const syntax_keywords_cpp_u[2] = {"using"};
-static char const *const syntax_keywords_cpp_v[2] = {"virtual"};
-static char const *const syntax_keywords_cpp_x[3] = {"xor","xor_eq"};
-static char const *const *const syntax_all_keywords_cpp[] = {
- ['a'] = syntax_keywords_cpp_a, ['b'] = syntax_keywords_cpp_b, ['c'] = syntax_keywords_cpp_c, ['d'] = syntax_keywords_cpp_d, ['e'] = syntax_keywords_cpp_e, ['f'] = syntax_keywords_cpp_f, ['m'] = syntax_keywords_cpp_m, ['n'] = syntax_keywords_cpp_n, ['o'] = syntax_keywords_cpp_o, ['p'] = syntax_keywords_cpp_p, ['r'] = syntax_keywords_cpp_r, ['s'] = syntax_keywords_cpp_s, ['t'] = syntax_keywords_cpp_t, ['u'] = syntax_keywords_cpp_u, ['v'] = syntax_keywords_cpp_v, ['x'] = syntax_keywords_cpp_x
+static Keyword const syntax_keywords_cpp_A[11] = {{"ATOMIC_ADDRESS_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_CHAR16_T_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_CHAR32_T_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_CHAR_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_FLAG_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_INT_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_LLONG_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_LONG_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_SHORT_LOCK_FREE", SYNTAX_CONSTANT},{"ATOMIC_WCHAR_T_LOCK_FREE", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_B[2] = {{"BUFSIZ", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_C[5] = {{"CHAR_BIT", SYNTAX_CONSTANT},{"CHAR_MAX", SYNTAX_CONSTANT},{"CHAR_MIN", SYNTAX_CONSTANT},{"CLOCKS_PER_SEC", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_D[12] = {{"DBL_DIG", SYNTAX_CONSTANT},{"DBL_EPSILON", SYNTAX_CONSTANT},{"DBL_HAS_SUBNORM", SYNTAX_CONSTANT},{"DBL_MANT_DIG", SYNTAX_CONSTANT},{"DBL_MAX", SYNTAX_CONSTANT},{"DBL_MAX_10_EXP", SYNTAX_CONSTANT},{"DBL_MAX_EXP", SYNTAX_CONSTANT},{"DBL_MIN", SYNTAX_CONSTANT},{"DBL_MIN_EXP", SYNTAX_CONSTANT},{"DBL_TRUE_MIN", SYNTAX_CONSTANT},{"DECIMAL_DIG", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_E[128] = {{"E2BIG", SYNTAX_CONSTANT},{"EACCES", SYNTAX_CONSTANT},{"EADDRINUSE", SYNTAX_CONSTANT},{"EADDRNOTAVAIL", SYNTAX_CONSTANT},{"EADV", SYNTAX_CONSTANT},{"EAFNOSUPPORT", SYNTAX_CONSTANT},{"EAGAIN", SYNTAX_CONSTANT},{"EALREADY", SYNTAX_CONSTANT},{"EBADE", SYNTAX_CONSTANT},{"EBADF", SYNTAX_CONSTANT},{"EBADFD", SYNTAX_CONSTANT},{"EBADMSG", SYNTAX_CONSTANT},{"EBADR", SYNTAX_CONSTANT},{"EBADRQC", SYNTAX_CONSTANT},{"EBADSLT", SYNTAX_CONSTANT},{"EBFONT", SYNTAX_CONSTANT},{"EBUSY", SYNTAX_CONSTANT},{"ECHILD", SYNTAX_CONSTANT},{"ECHRNG", SYNTAX_CONSTANT},{"ECOMM", SYNTAX_CONSTANT},{"ECONNABORTED", SYNTAX_CONSTANT},{"ECONNREFUSED", SYNTAX_CONSTANT},{"ECONNRESET", SYNTAX_CONSTANT},{"EDEADLK", SYNTAX_CONSTANT},{"EDEADLOCK", SYNTAX_CONSTANT},{"EDESTADDRREQ", SYNTAX_CONSTANT},{"EDOM", SYNTAX_CONSTANT},{"EDOTDOT", SYNTAX_CONSTANT},{"EDQUOT", SYNTAX_CONSTANT},{"EEXIST", SYNTAX_CONSTANT},{"EFAULT", SYNTAX_CONSTANT},{"EFBIG", SYNTAX_CONSTANT},{"EHOSTDOWN", SYNTAX_CONSTANT},{"EHOSTUNREACH", SYNTAX_CONSTANT},{"EIDRM", SYNTAX_CONSTANT},{"EILSEQ", SYNTAX_CONSTANT},{"EINPROGRESS", SYNTAX_CONSTANT},{"EINTR", SYNTAX_CONSTANT},{"EINVAL", SYNTAX_CONSTANT},{"EIO", SYNTAX_CONSTANT},{"EISCONN", SYNTAX_CONSTANT},{"EISDIR", SYNTAX_CONSTANT},{"EISNAM", SYNTAX_CONSTANT},{"EL2HLT", SYNTAX_CONSTANT},{"EL2NSYNC", SYNTAX_CONSTANT},{"EL3HLT", SYNTAX_CONSTANT},{"EL3RST", SYNTAX_CONSTANT},{"ELIBACC", SYNTAX_CONSTANT},{"ELIBBAD", SYNTAX_CONSTANT},{"ELIBEXEC", SYNTAX_CONSTANT},{"ELIBMAX", SYNTAX_CONSTANT},{"ELIBSCN", SYNTAX_CONSTANT},{"ELNRNG", SYNTAX_CONSTANT},{"ELOOP", SYNTAX_CONSTANT},{"EMEDIUMTYPE", SYNTAX_CONSTANT},{"EMFILE", SYNTAX_CONSTANT},{"EMLINK", SYNTAX_CONSTANT},{"EMSGSIZE", SYNTAX_CONSTANT},{"EMULTIHOP", SYNTAX_CONSTANT},{"ENAMETOOLONG", SYNTAX_CONSTANT},{"ENAVAIL", SYNTAX_CONSTANT},{"ENETDOWN", SYNTAX_CONSTANT},{"ENETRESET", SYNTAX_CONSTANT},{"ENETUNREACH", SYNTAX_CONSTANT},{"ENFILE", SYNTAX_CONSTANT},{"ENOANO", SYNTAX_CONSTANT},{"ENOBUFS", SYNTAX_CONSTANT},{"ENOCSI", SYNTAX_CONSTANT},{"ENODATA", SYNTAX_CONSTANT},{"ENODEV", SYNTAX_CONSTANT},{"ENOENT", SYNTAX_CONSTANT},{"ENOEXEC", SYNTAX_CONSTANT},{"ENOLCK", SYNTAX_CONSTANT},{"ENOLINK", SYNTAX_CONSTANT},{"ENOMEDIUM", SYNTAX_CONSTANT},{"ENOMEM", SYNTAX_CONSTANT},{"ENOMSG", SYNTAX_CONSTANT},{"ENONET", SYNTAX_CONSTANT},{"ENOPKG", SYNTAX_CONSTANT},{"ENOPROTOOPT", SYNTAX_CONSTANT},{"ENOSPC", SYNTAX_CONSTANT},{"ENOSR", SYNTAX_CONSTANT},{"ENOSTR", SYNTAX_CONSTANT},{"ENOSYS", SYNTAX_CONSTANT},{"ENOTBLK", SYNTAX_CONSTANT},{"ENOTCONN", SYNTAX_CONSTANT},{"ENOTDIR", SYNTAX_CONSTANT},{"ENOTEMPTY", SYNTAX_CONSTANT},{"ENOTNAM", SYNTAX_CONSTANT},{"ENOTSOCK", SYNTAX_CONSTANT},{"ENOTTY", SYNTAX_CONSTANT},{"ENOTUNIQ", SYNTAX_CONSTANT},{"ENXIO", SYNTAX_CONSTANT},{"EOF", SYNTAX_CONSTANT},{"EOPNOTSUPP", SYNTAX_CONSTANT},{"EOVERFLOW", SYNTAX_CONSTANT},{"EPERM", SYNTAX_CONSTANT},{"EPFNOSUPPORT", SYNTAX_CONSTANT},{"EPIPE", SYNTAX_CONSTANT},{"EPROTO", SYNTAX_CONSTANT},{"EPROTONOSUPPORT", SYNTAX_CONSTANT},{"EPROTOTYPE", SYNTAX_CONSTANT},{"ERANGE", SYNTAX_CONSTANT},{"EREMCHG", SYNTAX_CONSTANT},{"EREMOTE", SYNTAX_CONSTANT},{"EREMOTEIO", SYNTAX_CONSTANT},{"ERESTART", SYNTAX_CONSTANT},{"EROFS", SYNTAX_CONSTANT},{"ESHUTDOWN", SYNTAX_CONSTANT},{"ESOCKTNOSUPPORT", SYNTAX_CONSTANT},{"ESPIPE", SYNTAX_CONSTANT},{"ESRCH", SYNTAX_CONSTANT},{"ESRMNT", SYNTAX_CONSTANT},{"ESTALE", SYNTAX_CONSTANT},{"ESTRPIPE", SYNTAX_CONSTANT},{"ETIME", SYNTAX_CONSTANT},{"ETIMEDOUT", SYNTAX_CONSTANT},{"ETOOMANYREFS", SYNTAX_CONSTANT},{"ETXTBSY", SYNTAX_CONSTANT},{"EUCLEAN", SYNTAX_CONSTANT},{"EUNATCH", SYNTAX_CONSTANT},{"EUSERS", SYNTAX_CONSTANT},{"EWOULDBLOCK", SYNTAX_CONSTANT},{"EXDEV", SYNTAX_CONSTANT},{"EXFULL", SYNTAX_CONSTANT},{"EXIT_FAILURE", SYNTAX_CONSTANT},{"EXIT_SUCCESS", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_F[39] = {{"FE_ALL_EXCEPT", SYNTAX_CONSTANT},{"FE_DFL_ENV", SYNTAX_CONSTANT},{"FE_DIVBYZERO", SYNTAX_CONSTANT},{"FE_DOWNWARD", SYNTAX_CONSTANT},{"FE_INEXACT", SYNTAX_CONSTANT},{"FE_INVALID", SYNTAX_CONSTANT},{"FE_OVERFLOW", SYNTAX_CONSTANT},{"FE_TONEAREST", SYNTAX_CONSTANT},{"FE_TOWARDZERO", SYNTAX_CONSTANT},{"FE_UNDERFLOW", SYNTAX_CONSTANT},{"FE_UPWARD", SYNTAX_CONSTANT},{"FILE", SYNTAX_CONSTANT},{"FILENAME_MAX", SYNTAX_CONSTANT},{"FLT_DECIMAL_DIG", SYNTAX_CONSTANT},{"FLT_DIG", SYNTAX_CONSTANT},{"FLT_EVAL_METHOD", SYNTAX_CONSTANT},{"FLT_HAS_SUBNORM", SYNTAX_CONSTANT},{"FLT_MANT_DIG", SYNTAX_CONSTANT},{"FLT_MAX", SYNTAX_CONSTANT},{"FLT_MAX_10_EXP", SYNTAX_CONSTANT},{"FLT_MAX_EXP", SYNTAX_CONSTANT},{"FLT_MIN", SYNTAX_CONSTANT},{"FLT_MIN_10_EXP", SYNTAX_CONSTANT},{"FLT_MIN_EXP", SYNTAX_CONSTANT},{"FLT_RADIX", SYNTAX_CONSTANT},{"FLT_ROUNDS", SYNTAX_CONSTANT},{"FLT_TRUE_MIN", SYNTAX_CONSTANT},{"FOPEN_MAX", SYNTAX_CONSTANT},{"FP_FAST_FMA", SYNTAX_CONSTANT},{"FP_FAST_FMAF", SYNTAX_CONSTANT},{"FP_FAST_FMAL", SYNTAX_CONSTANT},{"FP_ILOGB0", SYNTAX_CONSTANT},{"FP_ILOGBNAN", SYNTAX_CONSTANT},{"FP_INFINITE", SYNTAX_CONSTANT},{"FP_NAN", SYNTAX_CONSTANT},{"FP_NORMAL", SYNTAX_CONSTANT},{"FP_SUBNORMAL", SYNTAX_CONSTANT},{"FP_ZERO", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_H[4] = {{"HUGE_VAL", SYNTAX_CONSTANT},{"HUGE_VALF", SYNTAX_CONSTANT},{"HUGE_VALL", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_I[33] = {{"I", SYNTAX_CONSTANT},{"INFINITY", SYNTAX_CONSTANT},{"INT16_MAX", SYNTAX_CONSTANT},{"INT16_MIN", SYNTAX_CONSTANT},{"INT32_MAX", SYNTAX_CONSTANT},{"INT32_MIN", SYNTAX_CONSTANT},{"INT64_MAX", SYNTAX_CONSTANT},{"INT64_MIN", SYNTAX_CONSTANT},{"INT8_MAX", SYNTAX_CONSTANT},{"INT8_MIN", SYNTAX_CONSTANT},{"INTMAX_MAX", SYNTAX_CONSTANT},{"INTMAX_MIN", SYNTAX_CONSTANT},{"INTPTR_MAX", SYNTAX_CONSTANT},{"INTPTR_MIN", SYNTAX_CONSTANT},{"INT_FAST16_MAX", SYNTAX_CONSTANT},{"INT_FAST16_MIN", SYNTAX_CONSTANT},{"INT_FAST32_MAX", SYNTAX_CONSTANT},{"INT_FAST32_MIN", SYNTAX_CONSTANT},{"INT_FAST64_MAX", SYNTAX_CONSTANT},{"INT_FAST64_MIN", SYNTAX_CONSTANT},{"INT_FAST8_MAX", SYNTAX_CONSTANT},{"INT_FAST8_MIN", SYNTAX_CONSTANT},{"INT_LEAST16_MAX", SYNTAX_CONSTANT},{"INT_LEAST16_MIN", SYNTAX_CONSTANT},{"INT_LEAST32_MAX", SYNTAX_CONSTANT},{"INT_LEAST32_MIN", SYNTAX_CONSTANT},{"INT_LEAST64_MAX", SYNTAX_CONSTANT},{"INT_LEAST64_MIN", SYNTAX_CONSTANT},{"INT_LEAST8_MAX", SYNTAX_CONSTANT},{"INT_LEAST8_MIN", SYNTAX_CONSTANT},{"INT_MAX", SYNTAX_CONSTANT},{"INT_MIN", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_L[23] = {{"LC_ALL", SYNTAX_CONSTANT},{"LC_COLLATE", SYNTAX_CONSTANT},{"LC_CTYPE", SYNTAX_CONSTANT},{"LC_MONETARY", SYNTAX_CONSTANT},{"LC_NUMERIC", SYNTAX_CONSTANT},{"LC_TIME", SYNTAX_CONSTANT},{"LDBL_DECIMAL_DIG", SYNTAX_CONSTANT},{"LDBL_DIG", SYNTAX_CONSTANT},{"LDBL_EPSILON", SYNTAX_CONSTANT},{"LDBL_MANT_DIG", SYNTAX_CONSTANT},{"LDBL_MAX", SYNTAX_CONSTANT},{"LDBL_MAX_10_EXP", SYNTAX_CONSTANT},{"LDBL_MAX_EXP", SYNTAX_CONSTANT},{"LDBL_MIN", SYNTAX_CONSTANT},{"LDBL_MIN_10_EXP", SYNTAX_CONSTANT},{"LDBL_MIN_EXP", SYNTAX_CONSTANT},{"LDBL_TRUE_MIN", SYNTAX_CONSTANT},{"LLONG_MAX", SYNTAX_CONSTANT},{"LLONG_MIN", SYNTAX_CONSTANT},{"LONG_MAX", SYNTAX_CONSTANT},{"LONG_MIN", SYNTAX_CONSTANT},{"L_tmpnam", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_M[5] = {{"MATH_ERREXCEPT", SYNTAX_CONSTANT},{"MATH_ERRNO", SYNTAX_CONSTANT},{"MB_CUR_MAX", SYNTAX_CONSTANT},{"MB_LEN_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_N[4] = {{"NAN", SYNTAX_CONSTANT},{"NDEBUG", SYNTAX_CONSTANT},{"NULL", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_O[2] = {{"ONCE_FLAG_INIT", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_P[87] = {{"PRIX16", SYNTAX_CONSTANT},{"PRIX32", SYNTAX_CONSTANT},{"PRIX64", SYNTAX_CONSTANT},{"PRIX8", SYNTAX_CONSTANT},{"PRIXFAST16", SYNTAX_CONSTANT},{"PRIXFAST32", SYNTAX_CONSTANT},{"PRIXFAST64", SYNTAX_CONSTANT},{"PRIXFAST8", SYNTAX_CONSTANT},{"PRIXLEAST16", SYNTAX_CONSTANT},{"PRIXLEAST32", SYNTAX_CONSTANT},{"PRIXLEAST64", SYNTAX_CONSTANT},{"PRIXLEAST8", SYNTAX_CONSTANT},{"PRIXMAX", SYNTAX_CONSTANT},{"PRIXPTR", SYNTAX_CONSTANT},{"PRId16", SYNTAX_CONSTANT},{"PRId32", SYNTAX_CONSTANT},{"PRId64", SYNTAX_CONSTANT},{"PRId8", SYNTAX_CONSTANT},{"PRIdFAST16", SYNTAX_CONSTANT},{"PRIdFAST32", SYNTAX_CONSTANT},{"PRIdFAST64", SYNTAX_CONSTANT},{"PRIdFAST8", SYNTAX_CONSTANT},{"PRIdLEAST16", SYNTAX_CONSTANT},{"PRIdLEAST32", SYNTAX_CONSTANT},{"PRIdLEAST64", SYNTAX_CONSTANT},{"PRIdLEAST8", SYNTAX_CONSTANT},{"PRIdMAX", SYNTAX_CONSTANT},{"PRIdPTR", SYNTAX_CONSTANT},{"PRIi16", SYNTAX_CONSTANT},{"PRIi32", SYNTAX_CONSTANT},{"PRIi64", SYNTAX_CONSTANT},{"PRIi8", SYNTAX_CONSTANT},{"PRIiFAST16", SYNTAX_CONSTANT},{"PRIiFAST32", SYNTAX_CONSTANT},{"PRIiFAST64", SYNTAX_CONSTANT},{"PRIiFAST8", SYNTAX_CONSTANT},{"PRIiLEAST16", SYNTAX_CONSTANT},{"PRIiLEAST32", SYNTAX_CONSTANT},{"PRIiLEAST64", SYNTAX_CONSTANT},{"PRIiLEAST8", SYNTAX_CONSTANT},{"PRIiMAX", SYNTAX_CONSTANT},{"PRIiPTR", SYNTAX_CONSTANT},{"PRIo16", SYNTAX_CONSTANT},{"PRIo32", SYNTAX_CONSTANT},{"PRIo64", SYNTAX_CONSTANT},{"PRIo8", SYNTAX_CONSTANT},{"PRIoFAST16", SYNTAX_CONSTANT},{"PRIoFAST32", SYNTAX_CONSTANT},{"PRIoFAST64", SYNTAX_CONSTANT},{"PRIoFAST8", SYNTAX_CONSTANT},{"PRIoLEAST16", SYNTAX_CONSTANT},{"PRIoLEAST32", SYNTAX_CONSTANT},{"PRIoLEAST64", SYNTAX_CONSTANT},{"PRIoLEAST8", SYNTAX_CONSTANT},{"PRIoMAX", SYNTAX_CONSTANT},{"PRIoPTR", SYNTAX_CONSTANT},{"PRIu16", SYNTAX_CONSTANT},{"PRIu32", SYNTAX_CONSTANT},{"PRIu64", SYNTAX_CONSTANT},{"PRIu8", SYNTAX_CONSTANT},{"PRIuFAST16", SYNTAX_CONSTANT},{"PRIuFAST32", SYNTAX_CONSTANT},{"PRIuFAST64", SYNTAX_CONSTANT},{"PRIuFAST8", SYNTAX_CONSTANT},{"PRIuLEAST16", SYNTAX_CONSTANT},{"PRIuLEAST32", SYNTAX_CONSTANT},{"PRIuLEAST64", SYNTAX_CONSTANT},{"PRIuLEAST8", SYNTAX_CONSTANT},{"PRIuMAX", SYNTAX_CONSTANT},{"PRIuPTR", SYNTAX_CONSTANT},{"PRIx16", SYNTAX_CONSTANT},{"PRIx32", SYNTAX_CONSTANT},{"PRIx64", SYNTAX_CONSTANT},{"PRIx8", SYNTAX_CONSTANT},{"PRIxFAST16", SYNTAX_CONSTANT},{"PRIxFAST32", SYNTAX_CONSTANT},{"PRIxFAST64", SYNTAX_CONSTANT},{"PRIxFAST8", SYNTAX_CONSTANT},{"PRIxLEAST16", SYNTAX_CONSTANT},{"PRIxLEAST32", SYNTAX_CONSTANT},{"PRIxLEAST64", SYNTAX_CONSTANT},{"PRIxLEAST8", SYNTAX_CONSTANT},{"PRIxMAX", SYNTAX_CONSTANT},{"PRIxPTR", SYNTAX_CONSTANT},{"PTRDIFF_MAX", SYNTAX_CONSTANT},{"PTRDIFF_MIN", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_R[2] = {{"RSIZE_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_S[122] = {{"SCHAR_MAX", SYNTAX_CONSTANT},{"SCHAR_MIN", SYNTAX_CONSTANT},{"SCNd16", SYNTAX_CONSTANT},{"SCNd32", SYNTAX_CONSTANT},{"SCNd64", SYNTAX_CONSTANT},{"SCNd8", SYNTAX_CONSTANT},{"SCNdFAST16", SYNTAX_CONSTANT},{"SCNdFAST32", SYNTAX_CONSTANT},{"SCNdFAST64", SYNTAX_CONSTANT},{"SCNdFAST8", SYNTAX_CONSTANT},{"SCNdLEAST16", SYNTAX_CONSTANT},{"SCNdLEAST32", SYNTAX_CONSTANT},{"SCNdLEAST64", SYNTAX_CONSTANT},{"SCNdLEAST8", SYNTAX_CONSTANT},{"SCNdMAX", SYNTAX_CONSTANT},{"SCNdPTR", SYNTAX_CONSTANT},{"SCNi16", SYNTAX_CONSTANT},{"SCNi32", SYNTAX_CONSTANT},{"SCNi64", SYNTAX_CONSTANT},{"SCNi8", SYNTAX_CONSTANT},{"SCNiFAST16", SYNTAX_CONSTANT},{"SCNiFAST32", SYNTAX_CONSTANT},{"SCNiFAST64", SYNTAX_CONSTANT},{"SCNiFAST8", SYNTAX_CONSTANT},{"SCNiLEAST16", SYNTAX_CONSTANT},{"SCNiLEAST32", SYNTAX_CONSTANT},{"SCNiLEAST64", SYNTAX_CONSTANT},{"SCNiLEAST8", SYNTAX_CONSTANT},{"SCNiMAX", SYNTAX_CONSTANT},{"SCNiPTR", SYNTAX_CONSTANT},{"SCNo16", SYNTAX_CONSTANT},{"SCNo32", SYNTAX_CONSTANT},{"SCNo64", SYNTAX_CONSTANT},{"SCNo8", SYNTAX_CONSTANT},{"SCNoFAST16", SYNTAX_CONSTANT},{"SCNoFAST32", SYNTAX_CONSTANT},{"SCNoFAST64", SYNTAX_CONSTANT},{"SCNoFAST8", SYNTAX_CONSTANT},{"SCNoLEAST16", SYNTAX_CONSTANT},{"SCNoLEAST32", SYNTAX_CONSTANT},{"SCNoLEAST64", SYNTAX_CONSTANT},{"SCNoLEAST8", SYNTAX_CONSTANT},{"SCNoMAX", SYNTAX_CONSTANT},{"SCNoPTR", SYNTAX_CONSTANT},{"SCNu16", SYNTAX_CONSTANT},{"SCNu32", SYNTAX_CONSTANT},{"SCNu64", SYNTAX_CONSTANT},{"SCNu8", SYNTAX_CONSTANT},{"SCNuFAST16", SYNTAX_CONSTANT},{"SCNuFAST32", SYNTAX_CONSTANT},{"SCNuFAST64", SYNTAX_CONSTANT},{"SCNuFAST8", SYNTAX_CONSTANT},{"SCNuLEAST16", SYNTAX_CONSTANT},{"SCNuLEAST32", SYNTAX_CONSTANT},{"SCNuLEAST64", SYNTAX_CONSTANT},{"SCNuLEAST8", SYNTAX_CONSTANT},{"SCNuMAX", SYNTAX_CONSTANT},{"SCNuPTR", SYNTAX_CONSTANT},{"SCNx16", SYNTAX_CONSTANT},{"SCNx32", SYNTAX_CONSTANT},{"SCNx64", SYNTAX_CONSTANT},{"SCNx8", SYNTAX_CONSTANT},{"SCNxFAST16", SYNTAX_CONSTANT},{"SCNxFAST32", SYNTAX_CONSTANT},{"SCNxFAST64", SYNTAX_CONSTANT},{"SCNxFAST8", SYNTAX_CONSTANT},{"SCNxLEAST16", SYNTAX_CONSTANT},{"SCNxLEAST32", SYNTAX_CONSTANT},{"SCNxLEAST64", SYNTAX_CONSTANT},{"SCNxLEAST8", SYNTAX_CONSTANT},{"SCNxMAX", SYNTAX_CONSTANT},{"SCNxPTR", SYNTAX_CONSTANT},{"SEEK_CUR", SYNTAX_CONSTANT},{"SEEK_END", SYNTAX_CONSTANT},{"SEEK_SET", SYNTAX_CONSTANT},{"SHRT_MAX", SYNTAX_CONSTANT},{"SHRT_MIN", SYNTAX_CONSTANT},{"SIGABRT", SYNTAX_CONSTANT},{"SIGALRM", SYNTAX_CONSTANT},{"SIGBUS", SYNTAX_CONSTANT},{"SIGCHLD", SYNTAX_CONSTANT},{"SIGCLD", SYNTAX_CONSTANT},{"SIGCONT", SYNTAX_CONSTANT},{"SIGEMT", SYNTAX_CONSTANT},{"SIGFPE", SYNTAX_CONSTANT},{"SIGHUP", SYNTAX_CONSTANT},{"SIGILL", SYNTAX_CONSTANT},{"SIGINFO", SYNTAX_CONSTANT},{"SIGINT", SYNTAX_CONSTANT},{"SIGIO", SYNTAX_CONSTANT},{"SIGIOT", SYNTAX_CONSTANT},{"SIGKILL", SYNTAX_CONSTANT},{"SIGLOST", SYNTAX_CONSTANT},{"SIGPIPE", SYNTAX_CONSTANT},{"SIGPOLL", SYNTAX_CONSTANT},{"SIGPROF", SYNTAX_CONSTANT},{"SIGPWR", SYNTAX_CONSTANT},{"SIGQUIT", SYNTAX_CONSTANT},{"SIGSEGV", SYNTAX_CONSTANT},{"SIGSTKFLT", SYNTAX_CONSTANT},{"SIGSTOP", SYNTAX_CONSTANT},{"SIGSYS", SYNTAX_CONSTANT},{"SIGTERM", SYNTAX_CONSTANT},{"SIGTRAP", SYNTAX_CONSTANT},{"SIGTSTP", SYNTAX_CONSTANT},{"SIGTTIN", SYNTAX_CONSTANT},{"SIGTTOU", SYNTAX_CONSTANT},{"SIGUNUSED", SYNTAX_CONSTANT},{"SIGURG", SYNTAX_CONSTANT},{"SIGUSR1", SYNTAX_CONSTANT},{"SIGUSR2", SYNTAX_CONSTANT},{"SIGVTALRM", SYNTAX_CONSTANT},{"SIGWINCH", SYNTAX_CONSTANT},{"SIGXCPU", SYNTAX_CONSTANT},{"SIGXFSZ", SYNTAX_CONSTANT},{"SIG_ATOMIC_MAX", SYNTAX_CONSTANT},{"SIG_ATOMIC_MIN", SYNTAX_CONSTANT},{"SIG_DFL", SYNTAX_CONSTANT},{"SIG_ERR", SYNTAX_CONSTANT},{"SIG_IGN", SYNTAX_CONSTANT},{"SIZE_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_T[5] = {{"TIME_UTC", SYNTAX_CONSTANT},{"TMP_MAX", SYNTAX_CONSTANT},{"TMP_MAX_S", SYNTAX_CONSTANT},{"TSS_DTOR_ITERATIONS", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_U[20] = {{"UCHAR_MAX", SYNTAX_CONSTANT},{"UINT16_MAX", SYNTAX_CONSTANT},{"UINT32_MAX", SYNTAX_CONSTANT},{"UINT64_MAX", SYNTAX_CONSTANT},{"UINT8_MAX", SYNTAX_CONSTANT},{"UINTMAX_MAX", SYNTAX_CONSTANT},{"UINTPTR_MAX", SYNTAX_CONSTANT},{"UINT_FAST16_MAX", SYNTAX_CONSTANT},{"UINT_FAST32_MAX", SYNTAX_CONSTANT},{"UINT_FAST64_MAX", SYNTAX_CONSTANT},{"UINT_FAST8_MAX", SYNTAX_CONSTANT},{"UINT_LEAST16_MAX", SYNTAX_CONSTANT},{"UINT_LEAST32_MAX", SYNTAX_CONSTANT},{"UINT_LEAST64_MAX", SYNTAX_CONSTANT},{"UINT_LEAST8_MAX", SYNTAX_CONSTANT},{"UINT_MAX", SYNTAX_CONSTANT},{"ULLONG_MAX", SYNTAX_CONSTANT},{"ULONG_MAX", SYNTAX_CONSTANT},{"USHRT_MAX", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_W[6] = {{"WCHAR_MAX", SYNTAX_CONSTANT},{"WCHAR_MIN", SYNTAX_CONSTANT},{"WEOF", SYNTAX_CONSTANT},{"WINT_MAX", SYNTAX_CONSTANT},{"WINT_MIN", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp__[14] = {{"_Alignas", SYNTAX_KEYWORD},{"_Alignof", SYNTAX_KEYWORD},{"_Atomic", SYNTAX_KEYWORD},{"_Bool", SYNTAX_KEYWORD},{"_Complex", SYNTAX_KEYWORD},{"_Generic", SYNTAX_KEYWORD},{"_Imaginary", SYNTAX_KEYWORD},{"_Noreturn", SYNTAX_KEYWORD},{"_Static_assert", SYNTAX_KEYWORD},{"_Thread_local", SYNTAX_KEYWORD},{"_IOFBF", SYNTAX_CONSTANT},{"_IOLBF", SYNTAX_CONSTANT},{"_IONBF", SYNTAX_CONSTANT}};
+static Keyword const syntax_keywords_cpp_a[49] = {{"and", SYNTAX_KEYWORD},{"and_eq", SYNTAX_KEYWORD},{"asm", SYNTAX_KEYWORD},{"atomic_cancel", SYNTAX_KEYWORD},{"atomic_commit", SYNTAX_KEYWORD},{"atomic_noexcept", SYNTAX_KEYWORD},{"auto", SYNTAX_KEYWORD},{"alignas", SYNTAX_BUILTIN},{"alignof", SYNTAX_BUILTIN},{"atomic_address", SYNTAX_BUILTIN},{"atomic_bool", SYNTAX_BUILTIN},{"atomic_char", SYNTAX_BUILTIN},{"atomic_char16_t", SYNTAX_BUILTIN},{"atomic_char32_t", SYNTAX_BUILTIN},{"atomic_flag", SYNTAX_BUILTIN},{"atomic_int", SYNTAX_BUILTIN},{"atomic_int_fast16_t", SYNTAX_BUILTIN},{"atomic_int_fast32_t", SYNTAX_BUILTIN},{"atomic_int_fast64_t", SYNTAX_BUILTIN},{"atomic_int_fast8_t", SYNTAX_BUILTIN},{"atomic_int_least16_t", SYNTAX_BUILTIN},{"atomic_int_least32_t", SYNTAX_BUILTIN},{"atomic_int_least64_t", SYNTAX_BUILTIN},{"atomic_int_least8_t", SYNTAX_BUILTIN},{"atomic_intmax_t", SYNTAX_BUILTIN},{"atomic_intptr_t", SYNTAX_BUILTIN},{"atomic_llong", SYNTAX_BUILTIN},{"atomic_long", SYNTAX_BUILTIN},{"atomic_ptrdiff_t", SYNTAX_BUILTIN},{"atomic_schar", SYNTAX_BUILTIN},{"atomic_short", SYNTAX_BUILTIN},{"atomic_size_t", SYNTAX_BUILTIN},{"atomic_uchar", SYNTAX_BUILTIN},{"atomic_uint", SYNTAX_BUILTIN},{"atomic_uint_fast16_t", SYNTAX_BUILTIN},{"atomic_uint_fast32_t", SYNTAX_BUILTIN},{"atomic_uint_fast64_t", SYNTAX_BUILTIN},{"atomic_uint_fast8_t", SYNTAX_BUILTIN},{"atomic_uint_least16_t", SYNTAX_BUILTIN},{"atomic_uint_least32_t", SYNTAX_BUILTIN},{"atomic_uint_least64_t", SYNTAX_BUILTIN},{"atomic_uint_least8_t", SYNTAX_BUILTIN},{"atomic_uintmax_t", SYNTAX_BUILTIN},{"atomic_uintptr_t", SYNTAX_BUILTIN},{"atomic_ullong", SYNTAX_BUILTIN},{"atomic_ulong", SYNTAX_BUILTIN},{"atomic_ushort", SYNTAX_BUILTIN},{"atomic_wchar_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_b[5] = {{"bitand", SYNTAX_KEYWORD},{"bitor", SYNTAX_KEYWORD},{"bool", SYNTAX_KEYWORD},{"break", SYNTAX_KEYWORD}};
+static Keyword const syntax_keywords_cpp_c[23] = {{"case", SYNTAX_KEYWORD},{"catch", SYNTAX_KEYWORD},{"char", SYNTAX_KEYWORD},{"class", SYNTAX_KEYWORD},{"co_await", SYNTAX_KEYWORD},{"co_return", SYNTAX_KEYWORD},{"co_yield", SYNTAX_KEYWORD},{"compl", SYNTAX_KEYWORD},{"concept", SYNTAX_KEYWORD},{"const", SYNTAX_KEYWORD},{"const_cast", SYNTAX_KEYWORD},{"consteval", SYNTAX_KEYWORD},{"constexpr", SYNTAX_KEYWORD},{"constinit", SYNTAX_KEYWORD},{"continue", SYNTAX_KEYWORD},{"char16_t", SYNTAX_BUILTIN},{"char32_t", SYNTAX_BUILTIN},{"char8_t", SYNTAX_BUILTIN},{"clock_t", SYNTAX_BUILTIN},{"cnd_t", SYNTAX_BUILTIN},{"complex", SYNTAX_BUILTIN},{"constraint_handler_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_d[9] = {{"decltype", SYNTAX_KEYWORD},{"default", SYNTAX_KEYWORD},{"delete", SYNTAX_KEYWORD},{"do", SYNTAX_KEYWORD},{"double", SYNTAX_KEYWORD},{"dynamic_cast", SYNTAX_KEYWORD},{"div_t", SYNTAX_BUILTIN},{"double_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_e[7] = {{"else", SYNTAX_KEYWORD},{"enum", SYNTAX_KEYWORD},{"explicit", SYNTAX_KEYWORD},{"export", SYNTAX_KEYWORD},{"extern", SYNTAX_KEYWORD},{"errno_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_f[9] = {{"float", SYNTAX_KEYWORD},{"for", SYNTAX_KEYWORD},{"friend", SYNTAX_KEYWORD},{"false", SYNTAX_CONSTANT},{"fpos_t", SYNTAX_CONSTANT},{"fenv_t", SYNTAX_BUILTIN},{"fexcept_t", SYNTAX_BUILTIN},{"float_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_g[2] = {{"goto", SYNTAX_KEYWORD}};
+static Keyword const syntax_keywords_cpp_i[19] = {{"if", SYNTAX_KEYWORD},{"inline", SYNTAX_KEYWORD},{"int", SYNTAX_KEYWORD},{"imaxdiv_t", SYNTAX_BUILTIN},{"int16_t", SYNTAX_BUILTIN},{"int32_t", SYNTAX_BUILTIN},{"int64_t", SYNTAX_BUILTIN},{"int8_t", SYNTAX_BUILTIN},{"int_fast16_t", SYNTAX_BUILTIN},{"int_fast32_t", SYNTAX_BUILTIN},{"int_fast64_t", SYNTAX_BUILTIN},{"int_fast8_t", SYNTAX_BUILTIN},{"int_least16_t", SYNTAX_BUILTIN},{"int_least32_t", SYNTAX_BUILTIN},{"int_least64_t", SYNTAX_BUILTIN},{"int_least8_t", SYNTAX_BUILTIN},{"intmax_t", SYNTAX_BUILTIN},{"intptr_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_j[2] = {{"jmp_buf", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_l[4] = {{"long", SYNTAX_KEYWORD},{"ldiv_t", SYNTAX_BUILTIN},{"lldiv_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_m[17] = {{"mutable", SYNTAX_KEYWORD},{"mtx_plain", SYNTAX_CONSTANT},{"mtx_recursive", SYNTAX_CONSTANT},{"mtx_timed", SYNTAX_CONSTANT},{"mtx_try", SYNTAX_CONSTANT},{"math_errhandling", SYNTAX_BUILTIN},{"max_align_t", SYNTAX_BUILTIN},{"mbstate_t", SYNTAX_BUILTIN},{"memory_order", SYNTAX_BUILTIN},{"memory_order_acq_rel", SYNTAX_BUILTIN},{"memory_order_acquire", SYNTAX_BUILTIN},{"memory_order_consume", SYNTAX_BUILTIN},{"memory_order_relaxed", SYNTAX_BUILTIN},{"memory_order_release", SYNTAX_BUILTIN},{"memory_order_seq_cst", SYNTAX_BUILTIN},{"mtx_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_n[8] = {{"namespace", SYNTAX_KEYWORD},{"new", SYNTAX_KEYWORD},{"noexcept", SYNTAX_KEYWORD},{"not", SYNTAX_KEYWORD},{"not_eq", SYNTAX_KEYWORD},{"nullptr", SYNTAX_KEYWORD},{"noreturn", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_o[6] = {{"operator", SYNTAX_KEYWORD},{"or", SYNTAX_KEYWORD},{"or_eq", SYNTAX_KEYWORD},{"offsetof", SYNTAX_BUILTIN},{"once_flag", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_p[5] = {{"private", SYNTAX_KEYWORD},{"protected", SYNTAX_KEYWORD},{"public", SYNTAX_KEYWORD},{"ptrdiff_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_r[8] = {{"reflexpr", SYNTAX_KEYWORD},{"register", SYNTAX_KEYWORD},{"reinterpret_cast", SYNTAX_KEYWORD},{"requires", SYNTAX_KEYWORD},{"restrict", SYNTAX_KEYWORD},{"return", SYNTAX_KEYWORD},{"rsize_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_s[15] = {{"short", SYNTAX_KEYWORD},{"signed", SYNTAX_KEYWORD},{"sizeof", SYNTAX_KEYWORD},{"static", SYNTAX_KEYWORD},{"static_cast", SYNTAX_KEYWORD},{"struct", SYNTAX_KEYWORD},{"switch", SYNTAX_KEYWORD},{"synchronized", SYNTAX_KEYWORD},{"stderr", SYNTAX_CONSTANT},{"stdin", SYNTAX_CONSTANT},{"stdout", SYNTAX_CONSTANT},{"sig_atomic_t", SYNTAX_BUILTIN},{"size_t", SYNTAX_BUILTIN},{"static_assert", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_t[20] = {{"template", SYNTAX_KEYWORD},{"this", SYNTAX_KEYWORD},{"thread_local", SYNTAX_KEYWORD},{"throw", SYNTAX_KEYWORD},{"try", SYNTAX_KEYWORD},{"typedef", SYNTAX_KEYWORD},{"typeid", SYNTAX_KEYWORD},{"typename", SYNTAX_KEYWORD},{"thrd_busy", SYNTAX_CONSTANT},{"thrd_error", SYNTAX_CONSTANT},{"thrd_nomem", SYNTAX_CONSTANT},{"thrd_success", SYNTAX_CONSTANT},{"thrd_timeout", SYNTAX_CONSTANT},{"true", SYNTAX_CONSTANT},{"thrd_start_t", SYNTAX_BUILTIN},{"thrd_t", SYNTAX_BUILTIN},{"time_t", SYNTAX_BUILTIN},{"tss_dtor_t", SYNTAX_BUILTIN},{"tss_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_u[18] = {{"union", SYNTAX_KEYWORD},{"unsigned", SYNTAX_KEYWORD},{"using", SYNTAX_KEYWORD},{"uint16_t", SYNTAX_BUILTIN},{"uint32_t", SYNTAX_BUILTIN},{"uint64_t", SYNTAX_BUILTIN},{"uint8_t", SYNTAX_BUILTIN},{"uint_fast16_t", SYNTAX_BUILTIN},{"uint_fast32_t", SYNTAX_BUILTIN},{"uint_fast64_t", SYNTAX_BUILTIN},{"uint_fast8_t", SYNTAX_BUILTIN},{"uint_least16_t", SYNTAX_BUILTIN},{"uint_least32_t", SYNTAX_BUILTIN},{"uint_least64_t", SYNTAX_BUILTIN},{"uint_least8_t", SYNTAX_BUILTIN},{"uintmax_t", SYNTAX_BUILTIN},{"uintptr_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_v[5] = {{"virtual", SYNTAX_KEYWORD},{"void", SYNTAX_KEYWORD},{"volatile", SYNTAX_KEYWORD},{"va_list", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_w[6] = {{"wchar_t", SYNTAX_KEYWORD},{"while", SYNTAX_KEYWORD},{"wctrans_t", SYNTAX_BUILTIN},{"wctype_t", SYNTAX_BUILTIN},{"wint_t", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_cpp_x[4] = {{"xor", SYNTAX_KEYWORD},{"xor_eq", SYNTAX_KEYWORD},{"xtime", SYNTAX_BUILTIN}};
+static Keyword const *const syntax_all_keywords_cpp[] = {
+ ['A'] = syntax_keywords_cpp_A, ['B'] = syntax_keywords_cpp_B, ['C'] = syntax_keywords_cpp_C, ['D'] = syntax_keywords_cpp_D, ['E'] = syntax_keywords_cpp_E, ['F'] = syntax_keywords_cpp_F, ['H'] = syntax_keywords_cpp_H, ['I'] = syntax_keywords_cpp_I, ['L'] = syntax_keywords_cpp_L, ['M'] = syntax_keywords_cpp_M, ['N'] = syntax_keywords_cpp_N, ['O'] = syntax_keywords_cpp_O, ['P'] = syntax_keywords_cpp_P, ['R'] = syntax_keywords_cpp_R, ['S'] = syntax_keywords_cpp_S, ['T'] = syntax_keywords_cpp_T, ['U'] = syntax_keywords_cpp_U, ['W'] = syntax_keywords_cpp_W, ['_'] = syntax_keywords_cpp__, ['a'] = syntax_keywords_cpp_a, ['b'] = syntax_keywords_cpp_b, ['c'] = syntax_keywords_cpp_c, ['d'] = syntax_keywords_cpp_d, ['e'] = syntax_keywords_cpp_e, ['f'] = syntax_keywords_cpp_f, ['g'] = syntax_keywords_cpp_g, ['i'] = syntax_keywords_cpp_i, ['j'] = syntax_keywords_cpp_j, ['l'] = syntax_keywords_cpp_l, ['m'] = syntax_keywords_cpp_m, ['n'] = syntax_keywords_cpp_n, ['o'] = syntax_keywords_cpp_o, ['p'] = syntax_keywords_cpp_p, ['r'] = syntax_keywords_cpp_r, ['s'] = syntax_keywords_cpp_s, ['t'] = syntax_keywords_cpp_t, ['u'] = syntax_keywords_cpp_u, ['v'] = syntax_keywords_cpp_v, ['w'] = syntax_keywords_cpp_w, ['x'] = syntax_keywords_cpp_x
};
-static char const *const syntax_keywords_rust_S[2] = {"Self"};
-static char const *const syntax_keywords_rust_a[9] = {"abstract","as","asm!","assert!","assert_eq!","assert_ne!","async","await"};
-static char const *const syntax_keywords_rust_b[4] = {"become","box","break"};
-static char const *const syntax_keywords_rust_c[9] = {"cfg!","column!","compile_error!","concat!","concat_idents!","const","continue","crate"};
-static char const *const syntax_keywords_rust_d[7] = {"dbg!","debug_assert!","debug_assert_eq!","debug_assert_ne!","do","dyn"};
-static char const *const syntax_keywords_rust_e[7] = {"else","enum","env!","eprint!","eprintln!","extern"};
-static char const *const syntax_keywords_rust_f[9] = {"false","file!","final","fn","for","format!","format_args!","format_args_nl!"};
-static char const *const syntax_keywords_rust_g[2] = {"global_asm!"};
-static char const *const syntax_keywords_rust_i[14] = {"if","impl","in","include!","include_bytes!","include_str!","is_aarch64_feature_detected!","is_arm_feature_detected!","is_mips64_feature_detected!","is_mips_feature_detected!","is_powerpc64_feature_detected!","is_powerpc_feature_detected!","is_x86_feature_detected!"};
-static char const *const syntax_keywords_rust_l[6] = {"let","line!","llvm_asm!","log_syntax!","loop"};
-static char const *const syntax_keywords_rust_m[8] = {"macro","match","matches!","mod","module_path!","move","mut"};
-static char const *const syntax_keywords_rust_o[3] = {"option_env!","override"};
-static char const *const syntax_keywords_rust_p[6] = {"panic!","print!","println!","priv","pub"};
-static char const *const syntax_keywords_rust_r[3] = {"ref","return"};
-static char const *const syntax_keywords_rust_s[6] = {"self","static","stringify!","struct","super"};
-static char const *const syntax_keywords_rust_t[10] = {"thread_local!","todo!","trace_macros!","trait","true","try","try!","type","typeof"};
-static char const *const syntax_keywords_rust_u[7] = {"unimplemented!","union","unreachable!","unsafe","unsized","use"};
-static char const *const syntax_keywords_rust_v[3] = {"vec!","virtual"};
-static char const *const syntax_keywords_rust_w[5] = {"where","while","write!","writeln!"};
-static char const *const syntax_keywords_rust_y[2] = {"yield"};
-static char const *const *const syntax_all_keywords_rust[] = {
+static Keyword const syntax_keywords_rust_S[2] = {{"Self", SYNTAX_KEYWORD}};
+static Keyword const syntax_keywords_rust_a[9] = {{"abstract", SYNTAX_KEYWORD},{"as", SYNTAX_KEYWORD},{"async", SYNTAX_KEYWORD},{"await", SYNTAX_KEYWORD},{"asm!", SYNTAX_BUILTIN},{"assert!", SYNTAX_BUILTIN},{"assert_eq!", SYNTAX_BUILTIN},{"assert_ne!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_b[4] = {{"become", SYNTAX_KEYWORD},{"box", SYNTAX_KEYWORD},{"break", SYNTAX_KEYWORD}};
+static Keyword const syntax_keywords_rust_c[9] = {{"const", SYNTAX_KEYWORD},{"continue", SYNTAX_KEYWORD},{"crate", SYNTAX_KEYWORD},{"cfg!", SYNTAX_BUILTIN},{"column!", SYNTAX_BUILTIN},{"compile_error!", SYNTAX_BUILTIN},{"concat!", SYNTAX_BUILTIN},{"concat_idents!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_d[7] = {{"do", SYNTAX_KEYWORD},{"dyn", SYNTAX_KEYWORD},{"dbg!", SYNTAX_BUILTIN},{"debug_assert!", SYNTAX_BUILTIN},{"debug_assert_eq!", SYNTAX_BUILTIN},{"debug_assert_ne!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_e[7] = {{"else", SYNTAX_KEYWORD},{"enum", SYNTAX_KEYWORD},{"extern", SYNTAX_KEYWORD},{"env!", SYNTAX_BUILTIN},{"eprint!", SYNTAX_BUILTIN},{"eprintln!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_f[9] = {{"false", SYNTAX_KEYWORD},{"final", SYNTAX_KEYWORD},{"fn", SYNTAX_KEYWORD},{"for", SYNTAX_KEYWORD},{"file!", SYNTAX_BUILTIN},{"format!", SYNTAX_BUILTIN},{"format_args!", SYNTAX_BUILTIN},{"format_args_nl!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_g[2] = {{"global_asm!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_i[14] = {{"if", SYNTAX_KEYWORD},{"impl", SYNTAX_KEYWORD},{"in", SYNTAX_KEYWORD},{"include!", SYNTAX_BUILTIN},{"include_bytes!", SYNTAX_BUILTIN},{"include_str!", SYNTAX_BUILTIN},{"is_aarch64_feature_detected!", SYNTAX_BUILTIN},{"is_arm_feature_detected!", SYNTAX_BUILTIN},{"is_mips64_feature_detected!", SYNTAX_BUILTIN},{"is_mips_feature_detected!", SYNTAX_BUILTIN},{"is_powerpc64_feature_detected!", SYNTAX_BUILTIN},{"is_powerpc_feature_detected!", SYNTAX_BUILTIN},{"is_x86_feature_detected!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_l[6] = {{"let", SYNTAX_KEYWORD},{"loop", SYNTAX_KEYWORD},{"line!", SYNTAX_BUILTIN},{"llvm_asm!", SYNTAX_BUILTIN},{"log_syntax!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_m[8] = {{"macro", SYNTAX_KEYWORD},{"match", SYNTAX_KEYWORD},{"mod", SYNTAX_KEYWORD},{"move", SYNTAX_KEYWORD},{"mut", SYNTAX_KEYWORD},{"matches!", SYNTAX_BUILTIN},{"module_path!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_o[3] = {{"override", SYNTAX_KEYWORD},{"option_env!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_p[6] = {{"priv", SYNTAX_KEYWORD},{"pub", SYNTAX_KEYWORD},{"panic!", SYNTAX_BUILTIN},{"print!", SYNTAX_BUILTIN},{"println!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_r[3] = {{"ref", SYNTAX_KEYWORD},{"return", SYNTAX_KEYWORD}};
+static Keyword const syntax_keywords_rust_s[6] = {{"self", SYNTAX_KEYWORD},{"static", SYNTAX_KEYWORD},{"struct", SYNTAX_KEYWORD},{"super", SYNTAX_KEYWORD},{"stringify!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_t[10] = {{"trait", SYNTAX_KEYWORD},{"true", SYNTAX_KEYWORD},{"try", SYNTAX_KEYWORD},{"type", SYNTAX_KEYWORD},{"typeof", SYNTAX_KEYWORD},{"thread_local!", SYNTAX_BUILTIN},{"todo!", SYNTAX_BUILTIN},{"trace_macros!", SYNTAX_BUILTIN},{"try!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_u[7] = {{"union", SYNTAX_KEYWORD},{"unsafe", SYNTAX_KEYWORD},{"unsized", SYNTAX_KEYWORD},{"use", SYNTAX_KEYWORD},{"unimplemented!", SYNTAX_BUILTIN},{"unreachable!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_v[3] = {{"virtual", SYNTAX_KEYWORD},{"vec!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_w[5] = {{"where", SYNTAX_KEYWORD},{"while", SYNTAX_KEYWORD},{"write!", SYNTAX_BUILTIN},{"writeln!", SYNTAX_BUILTIN}};
+static Keyword const syntax_keywords_rust_y[2] = {{"yield", SYNTAX_KEYWORD}};
+static Keyword const *const syntax_all_keywords_rust[] = {
['S'] = syntax_keywords_rust_S, ['a'] = syntax_keywords_rust_a, ['b'] = syntax_keywords_rust_b, ['c'] = syntax_keywords_rust_c, ['d'] = syntax_keywords_rust_d, ['e'] = syntax_keywords_rust_e, ['f'] = syntax_keywords_rust_f, ['g'] = syntax_keywords_rust_g, ['i'] = syntax_keywords_rust_i, ['l'] = syntax_keywords_rust_l, ['m'] = syntax_keywords_rust_m, ['o'] = syntax_keywords_rust_o, ['p'] = syntax_keywords_rust_p, ['r'] = syntax_keywords_rust_r, ['s'] = syntax_keywords_rust_s, ['t'] = syntax_keywords_rust_t, ['u'] = syntax_keywords_rust_u, ['v'] = syntax_keywords_rust_v, ['w'] = syntax_keywords_rust_w, ['y'] = syntax_keywords_rust_y
};
diff --git a/keywords.py b/keywords.py
index 49c68bf..c4c4a13 100644
--- a/keywords.py
+++ b/keywords.py
@@ -1,63 +1,57 @@
import ast
+
+types = [
+ 'SYNTAX_KEYWORD', 'SYNTAX_CONSTANT', 'SYNTAX_BUILTIN'
+]
+exec('\n'.join(['{} = {}'.format(type, i) for (i, type) in enumerate(types)]))
+
def process_keywords(keywords):
assert len(set(keywords)) == len(keywords)
keywords_by_c = {}
- for kwd in keywords:
+ for (type,kwd) in keywords:
c = kwd[0]
if c in keywords_by_c:
- keywords_by_c[c].append(kwd)
+ keywords_by_c[c].append((type, kwd))
else:
- keywords_by_c[c] = [kwd]
+ keywords_by_c[c] = [(type, kwd)]
return keywords_by_c
def output_keywords(file, keywords, language):
keywords = process_keywords(keywords)
for (c, kwds) in sorted(keywords.items()):
kwds = list(sorted(kwds))
- file.write('static char const *const syntax_keywords_{}_{}[{}] = {{'.format(language, c, len(kwds)+1))
- file.write(','.join(map(lambda x: '"'+x+'"', kwds)) + '};\n')
- file.write('static char const *const *const syntax_all_keywords_{}[] = {{\n'.format(language))
+ file.write('static Keyword const syntax_keywords_{}_{}[{}] = {{'.format(language, c, len(kwds)+1))
+ file.write(','.join(map(lambda kwd: '{"'+kwd[1]+'", ' + types[kwd[0]] + '}', kwds)) + '};\n')
+ file.write('static Keyword const *const syntax_all_keywords_{}[] = {{\n'.format(language))
file.write('\t'+', '.join(["['{}'] = syntax_keywords_{}_{}".format(c, language, c) for c in sorted(keywords.keys())]) + '\n')
file.write('};\n\n')
-keywords_c = ["CHAR_BIT", "CHAR_MAX", "CHAR_MIN", "DBL_DIG", "DBL_EPSILON", "DBL_HAS_SUBNORM", "DBL_MANT_DIG", "DBL_MAX",
- "DBL_MAX_10_EXP", "DBL_MAX_EXP", "DBL_MIN", "DBL_MIN_EXP", "DBL_TRUE_MIN", "DECIMAL_DIG", "EXIT_FAILURE", "EXIT_SUCCESS",
- "FLT_DECIMAL_DIG", "FLT_DIG", "FLT_EVAL_METHOD", "FLT_HAS_SUBNORM", "FLT_MANT_DIG", "FLT_MAX", "FLT_MAX_10_EXP", "FLT_MAX_EXP",
- "FLT_MIN", "FLT_MIN_10_EXP", "FLT_MIN_EXP", "FLT_RADIX", "FLT_ROUNDS", "FLT_TRUE_MIN", "INT16_MAX", "INT16_MIN",
- "INT32_MAX", "INT32_MIN", "INT64_MAX", "INT64_MIN", "INT8_MAX", "INT8_MIN", "INTMAX_MAX", "INTMAX_MIN",
- "INTPTR_MAX", "INTPTR_MIN", "INT_FAST16_MAX", "INT_FAST16_MIN", "INT_FAST32_MAX", "INT_FAST32_MIN", "INT_FAST64_MAX", "INT_FAST64_MIN",
- "INT_FAST8_MAX", "INT_FAST8_MIN", "INT_LEAST16_MAX", "INT_LEAST16_MIN", "INT_LEAST32_MAX", "INT_LEAST32_MIN", "INT_LEAST64_MAX", "INT_LEAST64_MIN",
- "INT_LEAST8_MAX", "INT_LEAST8_MIN", "INT_MAX", "INT_MIN", "LDBL_DECIMAL_DIG", "LDBL_DIG", "LDBL_EPSILON", "LDBL_MANT_DIG",
- "LDBL_MAX", "LDBL_MAX_10_EXP", "LDBL_MAX_EXP", "LDBL_MIN", "LDBL_MIN_10_EXP", "LDBL_MIN_EXP", "LDBL_TRUE_MIN", "LLONG_MAX",
- "LLONG_MIN", "LONG_MAX", "LONG_MIN", "MB_LEN_MAX", "NULL", "SCHAR_MAX", "SCHAR_MIN", "SHRT_MAX",
- "SHRT_MIN", "UCHAR_MAX", "UINT16_MAX", "UINT32_MAX", "UINT64_MAX", "UINT8_MAX", "UINTMAX_MAX", "UINTPTR_MAX",
- "UINT_FAST16_MAX", "UINT_FAST32_MAX", "UINT_FAST64_MAX", "UINT_FAST8_MAX", "UINT_LEAST16_MAX", "UINT_LEAST32_MAX", "UINT_LEAST64_MAX", "UINT_LEAST8_MAX",
- "UINT_MAX", "ULLONG_MAX", "ULONG_MAX", "USHRT_MAX", "_Alignas", "_Alignof", "_Atomic", "_Bool",
- "_Complex", "_Generic", "_Imaginary", "_Noreturn", "_Static_assert", "_Thread_local", "auto", "bool",
- "break", "case", "char", "char16_t", "char32_t", "char8_t", "const", "continue",
- "default", "do", "double", "else", "enum", "extern", "false", "float",
- "for", "goto", "if", "inline", "int", "int16_t", "int32_t", "int64_t",
- "int8_t", "long", "register", "restrict", "return", "short", "signed", "sizeof",
- "static", "struct", "switch", "true", "typedef", "uint16_t", "uint32_t", "uint64_t",
- "uint8_t", "union", "unsigned", "void", "volatile", "wchar_t", "while", "wint_t",
- "size_t", "rsize_t", "uintptr_t", "intptr_t", "intmax_t", "uintmax_t",
- "PTRDIFF_MIN", "PTRDIFF_MAX", 'SIG_ATOMIC_MIN', 'SIG_ATOMIC_MAX',
+constants_c = ['CHAR_BIT', 'CHAR_MAX', 'CHAR_MIN', 'DBL_DIG', 'DBL_EPSILON', 'DBL_HAS_SUBNORM', 'DBL_MANT_DIG', 'DBL_MAX',
+ 'DBL_MAX_10_EXP', 'DBL_MAX_EXP', 'DBL_MIN', 'DBL_MIN_EXP', 'DBL_TRUE_MIN', 'DECIMAL_DIG', 'EXIT_FAILURE', 'EXIT_SUCCESS',
+ 'FLT_DECIMAL_DIG', 'FLT_DIG', 'FLT_EVAL_METHOD', 'FLT_HAS_SUBNORM', 'FLT_MANT_DIG', 'FLT_MAX', 'FLT_MAX_10_EXP', 'FLT_MAX_EXP',
+ 'FLT_MIN', 'FLT_MIN_10_EXP', 'FLT_MIN_EXP', 'FLT_RADIX', 'FLT_ROUNDS', 'FLT_TRUE_MIN', 'INT16_MAX', 'INT16_MIN',
+ 'INT32_MAX', 'INT32_MIN', 'INT64_MAX', 'INT64_MIN', 'INT8_MAX', 'INT8_MIN', 'INTMAX_MAX', 'INTMAX_MIN',
+ 'INTPTR_MAX', 'INTPTR_MIN', 'INT_FAST16_MAX', 'INT_FAST16_MIN', 'INT_FAST32_MAX', 'INT_FAST32_MIN', 'INT_FAST64_MAX', 'INT_FAST64_MIN',
+ 'INT_FAST8_MAX', 'INT_FAST8_MIN', 'INT_LEAST16_MAX', 'INT_LEAST16_MIN', 'INT_LEAST32_MAX', 'INT_LEAST32_MIN', 'INT_LEAST64_MAX', 'INT_LEAST64_MIN',
+ 'INT_LEAST8_MAX', 'INT_LEAST8_MIN', 'INT_MAX', 'INT_MIN', 'LDBL_DECIMAL_DIG', 'LDBL_DIG', 'LDBL_EPSILON', 'LDBL_MANT_DIG',
+ 'LDBL_MAX', 'LDBL_MAX_10_EXP', 'LDBL_MAX_EXP', 'LDBL_MIN', 'LDBL_MIN_10_EXP', 'LDBL_MIN_EXP', 'LDBL_TRUE_MIN', 'LLONG_MAX',
+ 'LLONG_MIN', 'LONG_MAX', 'LONG_MIN', 'MB_LEN_MAX', 'NULL', 'SCHAR_MAX', 'SCHAR_MIN', 'SHRT_MAX',
+ 'SHRT_MIN', 'UCHAR_MAX', 'UINT16_MAX', 'UINT32_MAX', 'UINT64_MAX', 'UINT8_MAX', 'UINTMAX_MAX', 'UINTPTR_MAX',
+ 'UINT_FAST16_MAX', 'UINT_FAST32_MAX', 'UINT_FAST64_MAX', 'UINT_FAST8_MAX', 'UINT_LEAST16_MAX', 'UINT_LEAST32_MAX', 'UINT_LEAST64_MAX', 'UINT_LEAST8_MAX',
+ 'UINT_MAX', 'ULLONG_MAX', 'ULONG_MAX', 'USHRT_MAX', 'true', 'false',
+ 'PTRDIFF_MIN', 'PTRDIFF_MAX', 'SIG_ATOMIC_MIN', 'SIG_ATOMIC_MAX',
'SIZE_MAX', 'WCHAR_MIN', 'WCHAR_MAX', 'WINT_MIN', 'WINT_MAX',
'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',
- 'mbstate_t', 'TIME_UTC', 'static_assert', 'noreturn', 'alignof', 'alignas', 'complex',
- 'TMP_MAX_S',
- 'SIG_DFL', 'SIG_ERR', 'SIG_IGN',
- "SIGABRT", "SIGALRM", "SIGBUS", "SIGCHLD", "SIGCLD", "SIGCONT",
- "SIGEMT", "SIGFPE", "SIGHUP", "SIGILL", "SIGINFO", "SIGINT",
- "SIGIO", "SIGIOT", "SIGKILL", "SIGLOST", "SIGPIPE",
- "SIGPOLL", "SIGPROF", "SIGPWR", "SIGQUIT", "SIGSEGV", "SIGSTKFLT",
- "SIGSTOP", "SIGTSTP", "SIGSYS", "SIGTERM", "SIGTRAP", "SIGTTIN",
- "SIGTTOU", "SIGUNUSED", "SIGURG", "SIGUSR1", "SIGUSR2", "SIGVTALRM",
- "SIGXCPU", "SIGXFSZ", "SIGWINCH", 'imaxdiv_t',
- 'NDEBUG', 'I',
+ 'SEEK_CUR', 'SEEK_END', 'SEEK_SET', 'TMP_MAX', 'stderr', 'stdin', 'stdout', 'TIME_UTC',
+ 'TMP_MAX_S', 'SIG_DFL', 'SIG_ERR', 'SIG_IGN',
+ 'SIGABRT', 'SIGALRM', 'SIGBUS', 'SIGCHLD', 'SIGCLD', 'SIGCONT',
+ 'SIGEMT', 'SIGFPE', 'SIGHUP', 'SIGILL', 'SIGINFO', 'SIGINT',
+ 'SIGIO', 'SIGIOT', 'SIGKILL', 'SIGLOST', 'SIGPIPE',
+ 'SIGPOLL', 'SIGPROF', 'SIGPWR', 'SIGQUIT', 'SIGSEGV', 'SIGSTKFLT',
+ 'SIGSTOP', 'SIGTSTP', 'SIGSYS', 'SIGTERM', 'SIGTRAP', 'SIGTTIN',
+ 'SIGTTOU', 'SIGUNUSED', 'SIGURG', 'SIGUSR1', 'SIGUSR2', 'SIGVTALRM',
+ 'SIGXCPU', 'SIGXFSZ', 'SIGWINCH', 'NDEBUG', 'I',
'EPERM', 'ENOENT', 'ESRCH', 'EINTR', 'EIO', 'ENXIO',
'E2BIG', 'ENOEXEC', 'EBADF', 'ECHILD', 'EAGAIN', 'ENOMEM', 'EACCES',
'EFAULT', 'ENOTBLK', 'EBUSY', 'EEXIST', 'EXDEV', 'ENODEV', 'ENOTDIR',
@@ -77,28 +71,49 @@ keywords_c = ["CHAR_BIT", "CHAR_MAX", "CHAR_MIN", "DBL_DIG", "DBL_EPSILON", "DBL
'ENETUNREACH', 'ENETRESET', 'ECONNABORTED', 'ECONNRESET', 'ENOBUFS',
'EISCONN', 'ENOTCONN', 'ESHUTDOWN', 'ETOOMANYREFS', 'ETIMEDOUT',
'ECONNREFUSED', 'EHOSTDOWN', 'EHOSTUNREACH', 'EALREADY', 'EINPROGRESS',
- 'ESTALE', 'EUCLEAN', 'ENOTNAM',
- 'ENAVAIL', 'EISNAM', 'EREMOTEIO', 'EDQUOT', 'ENOMEDIUM', 'EMEDIUMTYPE',
- 'errno_t', 'fenv_t', 'fexcept_t', 'FE_DIVBYZERO', 'FE_INEXACT',
- 'FE_INVALID', 'FE_OVERFLOW', 'FE_UNDERFLOW', 'FE_ALL_EXCEPT', 'FE_DOWNWARD',
+ 'ESTALE', 'EUCLEAN', 'ENOTNAM', 'ENAVAIL', 'EISNAM', 'EREMOTEIO', 'EDQUOT', 'ENOMEDIUM', 'EMEDIUMTYPE',
+ 'FE_DIVBYZERO', 'FE_INEXACT', 'FE_INVALID', 'FE_OVERFLOW', 'FE_UNDERFLOW', 'FE_ALL_EXCEPT', 'FE_DOWNWARD',
'FE_TONEAREST', 'FE_TOWARDZERO', 'FE_UPWARD', 'FE_DFL_ENV',
'LC_ALL', 'LC_CTYPE', 'LC_NUMERIC', 'LC_COLLATE', 'LC_MONETARY', 'LC_TIME',
- 'float_t', 'double_t', 'HUGE_VAL', 'HUGE_VALF', 'HUGE_VALL', 'INFINITY',
+ '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_ILOGB0', 'FP_ILOGBNAN',
- 'MATH_ERRNO', 'MATH_ERREXCEPT', 'math_errhandling', 'jmp_buf', 'va_list',
+ 'MATH_ERRNO', 'MATH_ERREXCEPT', 'RSIZE_MAX', 'MB_CUR_MAX', 'CLOCKS_PER_SEC', 'WEOF',
+ 'ONCE_FLAG_INIT', 'TSS_DTOR_ITERATIONS',
+ 'thrd_timeout', 'thrd_success', 'thrd_busy', 'thrd_error', 'thrd_nomem',
+ 'mtx_plain', 'mtx_recursive', 'mtx_timed', 'mtx_try',
+]
+keywords_c = ['_Alignas', '_Alignof', '_Atomic', '_Bool',
+ '_Complex', '_Generic', '_Imaginary', '_Noreturn', '_Static_assert', '_Thread_local', 'auto',
+ 'break', 'case', 'char', 'const', 'continue',
+ 'default', 'do', 'double', 'else', 'enum', 'extern', 'float', 'for', 'goto', 'if', 'inline', 'int',
+ 'long', 'register', 'restrict', 'return', 'short', 'signed', 'sizeof',
+ 'static', 'struct', 'switch', 'typedef', 'union', 'unsigned', 'void', 'volatile', 'while',
+]
+builtins_c = [
+ 'bool',
+ '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',
+ 'char8_t', 'char16_t', 'char32_t',
+ 'wchar_t', 'wint_t',
+ 'size_t', 'rsize_t', 'uintptr_t', 'intptr_t', 'intmax_t', 'uintmax_t',
+ 'mbstate_t', 'static_assert', 'noreturn', 'alignof', 'alignas', 'complex',
+ 'imaxdiv_t',
+ 'math_errhandling', 'jmp_buf', 'va_list',
+ 'errno_t', 'fenv_t', 'fexcept_t',
+ 'float_t', 'double_t',
'sig_atomic_t', 'memory_order', 'memory_order_relaxed', 'memory_order_consume',
'memory_order_acquire', 'memory_order_release', 'memory_order_acq_rel', 'memory_order_seq_cst',
- 'ptrdiff_t', 'max_align_t', 'offsetof', 'RSIZE_MAX', 'MB_CUR_MAX', 'div_t', 'ldiv_t', 'lldiv_t',
- 'constraint_handler_t', 'ONCE_FLAG_INIT', 'TSS_DTOR_ITERATIONS', 'cnd_t', 'thrd_t', 'tss_t', 'mtx_t',
- 'tss_dtor_t', 'thrd_start_t', 'once_flag', 'xtime', 'mtx_plain', 'mtx_recursive', 'mtx_timed',
- 'mtx_try', 'thrd_timeout', 'thrd_success', 'thrd_busy', 'thrd_error', 'thrd_nomem',
- 'CLOCKS_PER_SEC', 'clock_t', 'time_t', 'WEOF', 'wctrans_t', 'wctype_t',
+ 'ptrdiff_t', 'max_align_t', 'offsetof',
+ 'div_t', 'ldiv_t', 'lldiv_t', 'constraint_handler_t', 'cnd_t', 'thrd_t', 'tss_t', 'mtx_t',
+ 'tss_dtor_t', 'thrd_start_t', 'once_flag', 'xtime',
+ 'clock_t', 'time_t', 'wctrans_t', 'wctype_t',
]
-
+
for x in ['char', 'char16_t', 'char32_t', 'wchar_t', 'short', 'int',
'long', 'llong', 'address', 'flag']:
- keywords_c.append('ATOMIC_{}_LOCK_FREE'.format(x.upper()))
+ constants_c.append('ATOMIC_{}_LOCK_FREE'.format(x.upper()))
for x in ['flag', 'bool', 'address', 'char', 'schar', 'uchar', 'short',
'ushort', 'int', 'uint', 'long', 'ulong', 'llong', 'ullong', 'char16_t',
'char32_t', 'wchar_t',
@@ -107,19 +122,19 @@ for x in ['flag', 'bool', 'address', 'char', 'schar', 'uchar', 'short',
'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', 'size_t', 'ptrdiff_t', 'intmax_t', 'uintmax_t']:
- keywords_c.append('atomic_{}'.format(x))
+ builtins_c.append('atomic_{}'.format(x))
for c in 'diouxX':
for thing in ['', 'LEAST', 'FAST']:
for N in [8, 16, 32, 64]:
- keywords_c.append('PRI{}{}{}'.format(c, thing, N))
- if c != 'X': keywords_c.append('SCN{}{}{}'.format(c, thing, N))
+ constants_c.append('PRI{}{}{}'.format(c, thing, N))
+ if c != 'X': constants_c.append('SCN{}{}{}'.format(c, thing, N))
- keywords_c.append('PRI{}PTR'.format(c))
- keywords_c.append('PRI{}MAX'.format(c))
+ constants_c.append('PRI{}PTR'.format(c))
+ constants_c.append('PRI{}MAX'.format(c))
if c != 'X':
- keywords_c.append('SCN{}PTR'.format(c))
- keywords_c.append('SCN{}MAX'.format(c))
+ constants_c.append('SCN{}PTR'.format(c))
+ constants_c.append('SCN{}MAX'.format(c))
# keywords unique to C++ (not in C)
keywords_cpp = [
@@ -133,28 +148,49 @@ keywords_cpp = [
'static_cast', 'synchronized', 'template', 'this',
'throw', 'try', 'typeid', 'typename', 'using', 'virtual',
'xor', 'xor_eq',
+ 'bool', 'wchar_t',
]
-assert not set(keywords_c).intersection(keywords_cpp)
+def cant_overlap(*args):
+ for i in range(len(args)):
+ for j in range(i):
+ assert not set(args[i]).intersection(args[j])
+cant_overlap(keywords_c, keywords_cpp)
keywords_rust = [
- "as", "break", "const", "continue", "crate", "else", "enum", "extern", "false", "fn", "for",
- "if", "impl", "in", "let", "loop", "match", "mod", "move", "mut", "pub", "ref", "return",
- "self", "Self", "static", "struct", "super", "trait", "true", "type", "unsafe", "use",
- "where", "while", "async", "await", "dyn", "abstract", "become", "box", "do", "final",
- "macro", "override", "priv", "typeof", "unsized", "virtual", "yield", "try", "union",
- "asm!","concat_idents!","format_args_nl!","global_asm!","is_aarch64_feature_detected!",
- "is_arm_feature_detected!","is_mips64_feature_detected!","is_mips_feature_detected!",
- "is_powerpc64_feature_detected!","is_powerpc_feature_detected!","llvm_asm!","log_syntax!",
- "trace_macros!","assert!","assert_eq!","assert_ne!","cfg!","column!","compile_error!",
- "concat!","dbg!","debug_assert!","debug_assert_eq!","debug_assert_ne!","env!","eprint!",
- "eprintln!","file!","format!","format_args!","include!","include_bytes!","include_str!",
- "is_x86_feature_detected!","line!","matches!","module_path!","option_env!","panic!",
- "print!","println!","stringify!","thread_local!","todo!","try!","unimplemented!",
- "unreachable!","vec!","write!","writeln!",
+ 'as', 'break', 'const', 'continue', 'crate', 'else', 'enum', 'extern', 'false', 'fn', 'for',
+ 'if', 'impl', 'in', 'let', 'loop', 'match', 'mod', 'move', 'mut', 'pub', 'ref', 'return',
+ 'self', 'Self', 'static', 'struct', 'super', 'trait', 'true', 'type', 'unsafe', 'use',
+ 'where', 'while', 'async', 'await', 'dyn', 'abstract', 'become', 'box', 'do', 'final',
+ 'macro', 'override', 'priv', 'typeof', 'unsized', 'virtual', 'yield', 'try', 'union',
+]
+builtins_rust = [
+ 'asm!','concat_idents!','format_args_nl!','global_asm!','is_aarch64_feature_detected!',
+ 'is_arm_feature_detected!','is_mips64_feature_detected!','is_mips_feature_detected!',
+ 'is_powerpc64_feature_detected!','is_powerpc_feature_detected!','llvm_asm!','log_syntax!',
+ 'trace_macros!','assert!','assert_eq!','assert_ne!','cfg!','column!','compile_error!',
+ 'concat!','dbg!','debug_assert!','debug_assert_eq!','debug_assert_ne!','env!','eprint!',
+ 'eprintln!','file!','format!','format_args!','include!','include_bytes!','include_str!',
+ 'is_x86_feature_detected!','line!','matches!','module_path!','option_env!','panic!',
+ 'print!','println!','stringify!','thread_local!','todo!','try!','unimplemented!',
+ 'unreachable!','vec!','write!','writeln!',
+ # @TODO: i32, u32, Some, str, etc.
]
file = open('keywords.h', 'w')
-output_keywords(file, keywords_c, 'c')
-output_keywords(file, keywords_cpp, 'cpp')
-output_keywords(file, keywords_rust, 'rust')
+file.write('''typedef struct {
+ char const *str;
+ SyntaxCharType type;
+} Keyword;\n\n''')
+
+def label(kwds, l):
+ return [(l, kwd) for kwd in kwds]
+
+cant_overlap(keywords_c, constants_c, builtins_c)
+c_things = label(keywords_c, SYNTAX_KEYWORD) + label(constants_c, SYNTAX_CONSTANT) + label(builtins_c, SYNTAX_BUILTIN)
+output_keywords(file, c_things, 'c')
+cpp_things = c_things + label(keywords_cpp, SYNTAX_KEYWORD)
+cpp_things.remove((SYNTAX_BUILTIN, 'bool'))
+cpp_things.remove((SYNTAX_BUILTIN, 'wchar_t'))
+output_keywords(file, cpp_things, 'cpp')
+output_keywords(file, label(keywords_rust, SYNTAX_KEYWORD) + label(builtins_rust, SYNTAX_BUILTIN), 'rust')
file.close()
diff --git a/string32.c b/string32.c
index a6f446a..fb1399e 100644
--- a/string32.c
+++ b/string32.c
@@ -130,4 +130,5 @@ bool is32_digit(char32_t c) {
// could this character appear in a C-style identifier?
bool is32_ident(char32_t c) {
return c <= WINT_MAX && (iswalnum((wint_t)c) || c == '_');
-} \ No newline at end of file
+}
+
diff --git a/syntax.c b/syntax.c
index d75412c..ae8ee0a 100644
--- a/syntax.c
+++ b/syntax.c
@@ -23,11 +23,12 @@ ColorSetting syntax_char_type_to_color(SyntaxCharType t) {
case SYNTAX_STRING: return COLOR_STRING;
case SYNTAX_CHARACTER: return COLOR_CHARACTER;
case SYNTAX_CONSTANT: return COLOR_CONSTANT;
+ case SYNTAX_BUILTIN: return COLOR_BUILTIN;
}
return COLOR_TEXT;
}
-static inline bool keyword_matches(char32_t *text, size_t len, char const *keyword) {
+static inline bool syntax_keyword_matches(char32_t *text, size_t len, char const *keyword) {
if (len == strlen(keyword)) {
bool matches = true;
char32_t *p = text;
@@ -44,12 +45,30 @@ static inline bool keyword_matches(char32_t *text, size_t len, char const *keywo
}
}
+// lookup the given string in the keywords table
+static Keyword const *syntax_keyword_lookup(Keyword const *const *all_keywords, size_t n_all_keywords, char32_t *str, size_t len) {
+ if (!len) return NULL;
+ if (str[0] >= n_all_keywords) return NULL;
+
+ Keyword const *keywords = all_keywords[str[0]];
+
+ if (keywords) {
+ for (size_t k = 0; keywords[k].str; ++k) {
+ if (syntax_keyword_matches(str, len, keywords[k].str)) {
+ return &keywords[k];
+ }
+ }
+ }
+ return NULL;
+}
+
// does i continue the number literal from i-1
static inline bool syntax_number_continues(char32_t *line, u32 line_len, u32 i) {
if (line[i] == '.' && ((i && line[i-1] == '.') || (i < line_len-1 && line[i+1] == '.')))
return false; // can't have two .s in a row
- return line[i] < CHAR_MAX && strchr(SYNTAX_DIGITS, (char)line[i])
- || (i && line[i-1] == 'e' && (line[i] == '+' || line[i] == '-'));
+ return (line[i] < CHAR_MAX &&
+ (strchr(SYNTAX_DIGITS, (char)line[i])
+ || (i && line[i-1] == 'e' && (line[i] == '+' || line[i] == '-'))));
}
// find how long this keyword would be (if this is a keyword)
@@ -63,6 +82,7 @@ static inline u32 syntax_keyword_len(Language lang, char32_t *line, u32 i, u32 l
return keyword_end - i;
}
+
static void syntax_highlight_c_cpp(SyntaxState *state_ptr, bool cpp, char32_t *line, u32 line_len, SyntaxCharType *char_types) {
SyntaxState state = *state_ptr;
bool in_preprocessor = (state & SYNTAX_STATE_CPP_PREPROCESSOR) != 0;
@@ -141,7 +161,7 @@ static void syntax_highlight_c_cpp(SyntaxState *state_ptr, bool cpp, char32_t *l
in_char = true;
}
break;
- case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': // don't you wish C had case ranges...
+ case ANY_DIGIT:
// a number!
if (char_types && !in_single_line_comment && !in_multi_line_comment && !in_string && !in_number && !in_char) {
in_number = true;
@@ -170,41 +190,17 @@ static void syntax_highlight_c_cpp(SyntaxState *state_ptr, bool cpp, char32_t *l
// keywords don't matter for advancing the state
if (char_types && !in_single_line_comment && !in_multi_line_comment && !in_string && !in_preprocessor && !in_char) {
u32 keyword_len = syntax_keyword_len(cpp ? LANG_CPP : LANG_C, line, i, line_len);
- char const *const *keywords = c < arr_count(syntax_all_keywords_c) ? syntax_all_keywords_c[c] : NULL;
- char const *keyword = NULL;
- if (keywords) {
- for (size_t k = 0; keywords[k]; ++k) {
- if (keyword_matches(&line[i], keyword_len, keywords[k])) {
- keyword = keywords[k];
- break;
- }
- }
- }
- if (cpp && !keyword) {
- // check C++'s keywords too!
- keywords = c < arr_count(syntax_all_keywords_cpp) ? syntax_all_keywords_cpp[c] : NULL;
- if (keywords) {
- for (size_t k = 0; keywords[k]; ++k) {
- if (keyword_matches(&line[i], keyword_len, keywords[k])) {
- keyword = keywords[k];
- break;
- }
- }
- }
- }
+ Keyword const *keyword = NULL;
+ if (cpp)
+ keyword = syntax_keyword_lookup(syntax_all_keywords_cpp, arr_count(syntax_all_keywords_cpp),
+ &line[i], keyword_len);
+ if (!keyword)
+ keyword = syntax_keyword_lookup(syntax_all_keywords_c, arr_count(syntax_all_keywords_c),
+ &line[i], keyword_len);
if (keyword) {
- // it's a keyword
- // let's highlight all of it now
- SyntaxCharType type = SYNTAX_KEYWORD;
- if (isupper(keyword[0]) ||
- (keyword_len == 4 && streq(keyword, "true")) ||
- (keyword_len == 5 && streq(keyword, "false")) ||
- (keyword_len == 6 && (streq(keyword, "stderr") || streq(keyword, "stdout")))
- ) {
- type = SYNTAX_CONSTANT; // these are constants, not keywords
- }
- for (size_t j = 0; keyword[j]; ++j) {
+ SyntaxCharType type = keyword->type;
+ for (size_t j = 0; j < keyword_len; ++j) {
char_types[i++] = type;
}
--i; // we'll increment i from the for loop
@@ -322,11 +318,12 @@ static void syntax_highlight_rust(SyntaxState *state, char32_t *line, u32 line_l
}
if (char_end < line_len && line[char_end] == '\'') {
// a character literal
- if (char_types)
+ if (char_types) {
for (u32 j = i; j <= char_end; ++j)
char_types[j] = SYNTAX_CHARACTER;
dealt_with = true;
- i = char_end;
+ }
+ i = char_end;
} else {
// a lifetime or something else
}
@@ -335,7 +332,7 @@ static void syntax_highlight_rust(SyntaxState *state, char32_t *line, u32 line_l
case '\\':
++backslashes;
break;
- case '0': case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': // don't you wish C had case ranges...
+ case ANY_DIGIT:
// a number!
if (char_types && !comment_depth && !in_string && !in_number) {
in_number = true;
@@ -354,28 +351,16 @@ static void syntax_highlight_rust(SyntaxState *state, char32_t *line, u32 line_l
if (char_types && !in_string && !comment_depth && !in_number) {
u32 keyword_len = syntax_keyword_len(LANG_RUST, line, i, line_len);
- char const *keyword = NULL;
- char const *const *keywords = c < arr_count(syntax_all_keywords_rust) ? syntax_all_keywords_rust[c] : NULL;
- if (keywords) {
- for (size_t k = 0; keywords[k]; ++k) {
- if (keyword_matches(&line[i], keyword_len, keywords[k])) {
- keyword = keywords[k];
- break;
- }
- }
- if (keyword) {
- SyntaxCharType type = SYNTAX_KEYWORD;
- if ((keyword_len == 4 && streq(keyword, "true"))
- || (keyword_len == 5 && streq(keyword, "false"))
- ) {
- type = SYNTAX_CONSTANT; // these are constants, not keywords
- }
- for (size_t j = 0; keyword[j]; ++j) {
- char_types[i++] = type;
- }
- --i; // we'll increment i from the for loop
- dealt_with = true;
+ Keyword const *keyword = syntax_keyword_lookup(syntax_all_keywords_rust, arr_count(syntax_all_keywords_rust),
+ &line[i], keyword_len);
+ if (keyword) {
+ SyntaxCharType type = keyword->type;
+ for (size_t j = 0; j < keyword_len; ++j) {
+ char_types[i++] = type;
}
+ --i; // we'll increment i from the for loop
+ dealt_with = true;
+ break;
}
}
} break;
diff --git a/ted.cfg b/ted.cfg
index 5158517..9c8ac90 100644
--- a/ted.cfg
+++ b/ted.cfg
@@ -135,11 +135,12 @@ cancel = #ffa
keyword = #0c0
preprocessor = #77f
string = #f77
-character = #a7f
+character = #fa7
+builtin = #a7f
comment = #999
constant = #8ff
[extensions]
C = .c, .h
C++ = .cpp, .hpp, .C, .H, .cxx, .hxx, .cc, .hh
-Rust = .rs \ No newline at end of file
+Rust = .rs
diff --git a/ted.h b/ted.h
index 97a8c64..6664e78 100644
--- a/ted.h
+++ b/ted.h
@@ -46,11 +46,12 @@ static LanguageName const language_names[] = {
ENUM_U8 {
SYNTAX_NORMAL,
SYNTAX_KEYWORD,
+ SYNTAX_BUILTIN,
SYNTAX_COMMENT,
SYNTAX_PREPROCESSOR,
SYNTAX_STRING,
SYNTAX_CHARACTER,
- SYNTAX_CONSTANT
+ SYNTAX_CONSTANT,
} ENUM_U8_END(SyntaxCharType);
typedef struct {