diff options
Diffstat (limited to '')
-rw-r--r-- | libraries/luajit-2.0/src/lj_cparse.h | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/libraries/luajit-2.0/src/lj_cparse.h b/libraries/luajit-2.0/src/lj_cparse.h deleted file mode 100644 index c947700..0000000 --- a/libraries/luajit-2.0/src/lj_cparse.h +++ /dev/null | |||
@@ -1,64 +0,0 @@ | |||
1 | /* | ||
2 | ** C declaration parser. | ||
3 | ** Copyright (C) 2005-2011 Mike Pall. See Copyright Notice in luajit.h | ||
4 | */ | ||
5 | |||
6 | #ifndef _LJ_CPARSE_H | ||
7 | #define _LJ_CPARSE_H | ||
8 | |||
9 | #include "lj_obj.h" | ||
10 | #include "lj_ctype.h" | ||
11 | |||
12 | #if LJ_HASFFI | ||
13 | |||
14 | /* C parser limits. */ | ||
15 | #define CPARSE_MAX_BUF 32768 /* Max. token buffer size. */ | ||
16 | #define CPARSE_MAX_DECLSTACK 100 /* Max. declaration stack depth. */ | ||
17 | #define CPARSE_MAX_DECLDEPTH 20 /* Max. recursive declaration depth. */ | ||
18 | #define CPARSE_MAX_PACKSTACK 7 /* Max. pack pragma stack depth. */ | ||
19 | |||
20 | /* Flags for C parser mode. */ | ||
21 | #define CPARSE_MODE_MULTI 1 /* Process multiple declarations. */ | ||
22 | #define CPARSE_MODE_ABSTRACT 2 /* Accept abstract declarators. */ | ||
23 | #define CPARSE_MODE_DIRECT 4 /* Accept direct declarators. */ | ||
24 | #define CPARSE_MODE_FIELD 8 /* Accept field width in bits, too. */ | ||
25 | #define CPARSE_MODE_NOIMPLICIT 16 /* Reject implicit declarations. */ | ||
26 | #define CPARSE_MODE_SKIP 32 /* Skip definitions, ignore errors. */ | ||
27 | |||
28 | typedef int CPChar; /* C parser character. Unsigned ext. from char. */ | ||
29 | typedef int CPToken; /* C parser token. */ | ||
30 | |||
31 | /* C parser internal value representation. */ | ||
32 | typedef struct CPValue { | ||
33 | union { | ||
34 | int32_t i32; /* Value for CTID_INT32. */ | ||
35 | uint32_t u32; /* Value for CTID_UINT32. */ | ||
36 | }; | ||
37 | CTypeID id; /* C Type ID of the value. */ | ||
38 | } CPValue; | ||
39 | |||
40 | /* C parser state. */ | ||
41 | typedef struct CPState { | ||
42 | CPChar c; /* Current character. */ | ||
43 | CPToken tok; /* Current token. */ | ||
44 | CPValue val; /* Token value. */ | ||
45 | GCstr *str; /* Interned string of identifier/keyword. */ | ||
46 | CType *ct; /* C type table entry. */ | ||
47 | const char *p; /* Current position in input buffer. */ | ||
48 | SBuf sb; /* String buffer for tokens. */ | ||
49 | lua_State *L; /* Lua state. */ | ||
50 | CTState *cts; /* C type state. */ | ||
51 | const char *srcname; /* Current source name. */ | ||
52 | BCLine linenumber; /* Input line counter. */ | ||
53 | int depth; /* Recursive declaration depth. */ | ||
54 | uint32_t tmask; /* Type mask for next identifier. */ | ||
55 | uint32_t mode; /* C parser mode. */ | ||
56 | uint8_t packstack[CPARSE_MAX_PACKSTACK]; /* Stack for pack pragmas. */ | ||
57 | uint8_t curpack; /* Current position in pack pragma stack. */ | ||
58 | } CPState; | ||
59 | |||
60 | LJ_FUNC int lj_cparse(CPState *cp); | ||
61 | |||
62 | #endif | ||
63 | |||
64 | #endif | ||