diff options
author | Alexey Romanoff <ar@logiceditor.com> | 2021-08-15 15:17:28 +0300 |
---|---|---|
committer | Alexey Romanoff <ar@logiceditor.com> | 2021-08-16 16:35:07 +0300 |
commit | 7668d9076da6e2ae9e220eafb5c6ee1e933c088d (patch) | |
tree | c2d8e3bdd0d6d189572bd50d8d9a078097fcc3b5 /lplprint.h | |
parent | 635a51b5c88e958c27b26e049c639ea774946367 (diff) | |
download | lpeglabel-7668d9076da6e2ae9e220eafb5c6ee1e933c088d.tar.gz lpeglabel-7668d9076da6e2ae9e220eafb5c6ee1e933c088d.tar.bz2 lpeglabel-7668d9076da6e2ae9e220eafb5c6ee1e933c088d.zip |
change prefix of source files from 'lp' to 'lpl'
To eliminate conflicts with the original LPeg:
> $ lua -e "require 'lpeg'; require 'lpeglabel'; for _ in (require'lxsh').lexers.lua.gmatch('1') do end"
lua: lpvm.c:347: match: Assertion `stack > getstackbase(L, ptop) && (stack - 1)->s != NULL' failed.
Aborted
Diffstat (limited to 'lplprint.h')
-rw-r--r-- | lplprint.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/lplprint.h b/lplprint.h new file mode 100644 index 0000000..4f020f5 --- /dev/null +++ b/lplprint.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* | ||
2 | ** $Id: lplprint.h $ | ||
3 | */ | ||
4 | |||
5 | |||
6 | #if !defined(lplprint_h) | ||
7 | #define lplprint_h | ||
8 | |||
9 | |||
10 | #include "lpltree.h" | ||
11 | #include "lplvm.h" | ||
12 | |||
13 | |||
14 | #if defined(LPEG_DEBUG) | ||
15 | |||
16 | LUAI_FUNC void printpatt (Instruction *p, int n); | ||
17 | LUAI_FUNC void printtree (TTree *tree, int ident); | ||
18 | LUAI_FUNC void printktable (lua_State *L, int idx); | ||
19 | LUAI_FUNC void printcharset (const byte *st); | ||
20 | LUAI_FUNC void printcaplist (Capture *cap, Capture *limit); | ||
21 | LUAI_FUNC 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 | |||