diff options
Diffstat (limited to 'lpcode.h')
-rw-r--r-- | lpcode.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/lpcode.h b/lpcode.h new file mode 100644 index 0000000..5c9d54f --- /dev/null +++ b/lpcode.h | |||
@@ -0,0 +1,34 @@ | |||
1 | /* | ||
2 | ** $Id: lpcode.h,v 1.5 2013/04/04 21:24:45 roberto Exp $ | ||
3 | */ | ||
4 | |||
5 | #if !defined(lpcode_h) | ||
6 | #define lpcode_h | ||
7 | |||
8 | #include "lua.h" | ||
9 | |||
10 | #include "lptypes.h" | ||
11 | #include "lptree.h" | ||
12 | #include "lpvm.h" | ||
13 | |||
14 | int tocharset (TTree *tree, Charset *cs); | ||
15 | int checkaux (TTree *tree, int pred); | ||
16 | int fixedlenx (TTree *tree, int count, int len); | ||
17 | int hascaptures (TTree *tree); | ||
18 | int lp_gc (lua_State *L); | ||
19 | Instruction *compile (lua_State *L, Pattern *p); | ||
20 | void reallocprog (lua_State *L, Pattern *p, int nsize); | ||
21 | int sizei (const Instruction *i); | ||
22 | |||
23 | |||
24 | #define PEnullable 0 | ||
25 | #define PEnofail 1 | ||
26 | |||
27 | #define nofail(t) checkaux(t, PEnofail) | ||
28 | #define nullable(t) checkaux(t, PEnullable) | ||
29 | |||
30 | #define fixedlen(t) fixedlenx(t, 0, 0) | ||
31 | |||
32 | |||
33 | |||
34 | #endif | ||