diff options
Diffstat (limited to 'lpprint.h')
-rw-r--r-- | lpprint.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lpprint.h b/lpprint.h new file mode 100644 index 0000000..6329760 --- /dev/null +++ b/lpprint.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | ** $Id: lpprint.h,v 1.2 2015/06/12 18:18:08 roberto Exp $ | ||
3 | */ | ||
4 | |||
5 | |||
6 | #if !defined(lpprint_h) | ||
7 | #define lpprint_h | ||
8 | |||
9 | |||
10 | #include "lptree.h" | ||
11 | #include "lpvm.h" | ||
12 | |||
13 | |||
14 | #if defined(LPEG_DEBUG) | ||
15 | |||
16 | void printpatt (Instruction *p, int n); | ||
17 | void printtree (TTree *tree, int ident); | ||
18 | void printktable (lua_State *L, int idx); | ||
19 | void printcharset (const byte *st); | ||
20 | void printcaplist (Capture *cap, Capture *limit); | ||
21 | void printinst (const Instruction *op, const Instruction *p); | ||
22 | |||
23 | #else | ||
24 | |||
25 | #define printktable(L,idx) \ | ||
26 | luaL_error(L, "function only implemented in debug mode") | ||
27 | #define printtree(tree,i) \ | ||
28 | luaL_error(L, "function only implemented in debug mode") | ||
29 | #define printpatt(p,n) \ | ||
30 | luaL_error(L, "function only implemented in debug mode") | ||
31 | |||
32 | #endif | ||
33 | |||
34 | |||
35 | #endif | ||
36 | |||