From e08e5df853560de6482d84066a7accc6a18de545 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 20 Feb 2019 10:13:46 -0300 Subject: Fist version of LPeg on GIT LPeg repository is being moved to git. Past versions won't be moved; they are still available in RCS. --- lpprint.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 lpprint.h (limited to 'lpprint.h') diff --git a/lpprint.h b/lpprint.h new file mode 100644 index 0000000..6329760 --- /dev/null +++ b/lpprint.h @@ -0,0 +1,36 @@ +/* +** $Id: lpprint.h,v 1.2 2015/06/12 18:18:08 roberto Exp $ +*/ + + +#if !defined(lpprint_h) +#define lpprint_h + + +#include "lptree.h" +#include "lpvm.h" + + +#if defined(LPEG_DEBUG) + +void printpatt (Instruction *p, int n); +void printtree (TTree *tree, int ident); +void printktable (lua_State *L, int idx); +void printcharset (const byte *st); +void printcaplist (Capture *cap, Capture *limit); +void printinst (const Instruction *op, const Instruction *p); + +#else + +#define printktable(L,idx) \ + luaL_error(L, "function only implemented in debug mode") +#define printtree(tree,i) \ + luaL_error(L, "function only implemented in debug mode") +#define printpatt(p,n) \ + luaL_error(L, "function only implemented in debug mode") + +#endif + + +#endif + -- cgit v1.2.3-55-g6feb