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
16void printpatt (Instruction *p, int n);
17void printtree (TTree *tree, int ident);
18void printktable (lua_State *L, int idx);
19void printcharset (const byte *st);
20void printcaplist (Capture *cap, Capture *limit);
21void 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
37