diff options
Diffstat (limited to 'lpprint.h')
-rw-r--r-- | lpprint.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/lpprint.h b/lpprint.h new file mode 100644 index 0000000..6cbe47d --- /dev/null +++ b/lpprint.h | |||
@@ -0,0 +1,37 @@ | |||
1 | /* | ||
2 | ** $Id: lpprint.h,v 1.1 2013/03/21 20:25:12 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 | |||
24 | #else | ||
25 | |||
26 | #define printktable(L,idx) \ | ||
27 | luaL_error(L, "function only implemented in debug mode") | ||
28 | #define printtree(tree,i) \ | ||
29 | luaL_error(L, "function only implemented in debug mode") | ||
30 | #define printpatt(p,n) \ | ||
31 | luaL_error(L, "function only implemented in debug mode") | ||
32 | |||
33 | #endif | ||
34 | |||
35 | |||
36 | #endif | ||
37 | |||