lpprint.h 641 B

123456789101112131415161718192021222324252627282930313233
  1. #if !defined(lpprint_h)
  2. #define lpprint_h
  3. #include "lptree.h"
  4. #include "lpvm.h"
  5. #if defined(LPEG_DEBUG)
  6. void printpatt (Instruction *p);
  7. void printtree (TTree *tree, int ident);
  8. void printktable (lua_State *L, int idx);
  9. void printcharset (const byte *st);
  10. void printcaplist (Capture *cap);
  11. void printinst (const Instruction *op, const Instruction *p);
  12. #else
  13. #define printktable(L,idx) \
  14. luaL_error(L, "function only implemented in debug mode")
  15. #define printtree(tree,i) \
  16. luaL_error(L, "function only implemented in debug mode")
  17. #define printpatt(p) \
  18. luaL_error(L, "function only implemented in debug mode")
  19. #endif
  20. #endif