2009-02-19 20:18:25 +03:00
|
|
|
/*
|
2018-08-23 20:26:12 +03:00
|
|
|
** $Id: lctype.c $
|
2009-02-19 20:18:25 +03:00
|
|
|
** 'ctype' functions for Lua
|
|
|
|
** See Copyright Notice in lua.h
|
|
|
|
*/
|
|
|
|
|
2011-10-03 20:19:23 +04:00
|
|
|
#define lctype_c
|
|
|
|
#define LUA_CORE
|
|
|
|
|
2014-11-02 22:19:04 +03:00
|
|
|
#include "lprefix.h"
|
|
|
|
|
|
|
|
|
2009-02-19 20:18:25 +03:00
|
|
|
#include "lctype.h"
|
|
|
|
|
2011-06-24 16:25:33 +04:00
|
|
|
#if !LUA_USE_CTYPE /* { */
|
|
|
|
|
|
|
|
#include <limits.h>
|
|
|
|
|
2019-12-17 20:24:30 +03:00
|
|
|
|
|
|
|
#if defined (LUA_UCID) /* accept UniCode IDentifiers? */
|
|
|
|
/* consider all non-ascii codepoints to be alphabetic */
|
|
|
|
#define NONA 0x01
|
|
|
|
#else
|
|
|
|
#define NONA 0x00 /* default */
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2009-11-19 22:06:52 +03:00
|
|
|
LUAI_DDEF const lu_byte luai_ctype_[UCHAR_MAX + 2] = {
|
2009-03-26 21:53:52 +03:00
|
|
|
0x00, /* EOZ */
|
2011-06-23 20:01:06 +04:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0. */
|
2009-02-19 20:18:25 +03:00
|
|
|
0x00, 0x08, 0x08, 0x08, 0x08, 0x08, 0x00, 0x00,
|
2011-06-23 20:01:06 +04:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 1. */
|
2009-02-19 20:18:25 +03:00
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
2011-06-23 20:01:06 +04:00
|
|
|
0x0c, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, /* 2. */
|
2009-02-19 20:18:25 +03:00
|
|
|
0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
2011-06-23 20:01:06 +04:00
|
|
|
0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, 0x16, /* 3. */
|
2009-03-10 20:42:33 +03:00
|
|
|
0x16, 0x16, 0x04, 0x04, 0x04, 0x04, 0x04, 0x04,
|
2011-06-23 20:01:06 +04:00
|
|
|
0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 4. */
|
2009-02-19 20:18:25 +03:00
|
|
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
2011-06-23 20:01:06 +04:00
|
|
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 5. */
|
|
|
|
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x05,
|
|
|
|
0x04, 0x15, 0x15, 0x15, 0x15, 0x15, 0x15, 0x05, /* 6. */
|
2009-02-19 20:18:25 +03:00
|
|
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05,
|
2011-06-23 20:01:06 +04:00
|
|
|
0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, /* 7. */
|
2009-02-19 20:18:25 +03:00
|
|
|
0x05, 0x05, 0x05, 0x04, 0x04, 0x04, 0x04, 0x00,
|
2019-12-17 20:24:30 +03:00
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA, /* 8. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA, /* 9. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA, /* a. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA, /* b. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
0x00, 0x00, NONA, NONA, NONA, NONA, NONA, NONA, /* c. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA, /* d. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA, /* e. */
|
|
|
|
NONA, NONA, NONA, NONA, NONA, NONA, NONA, NONA,
|
|
|
|
NONA, NONA, NONA, NONA, NONA, 0x00, 0x00, 0x00, /* f. */
|
|
|
|
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
2009-02-19 20:18:25 +03:00
|
|
|
};
|
2011-06-24 16:25:33 +04:00
|
|
|
|
|
|
|
#endif /* } */
|