aboutsummaryrefslogtreecommitdiff
path: root/lpcode.h
diff options
context:
space:
mode:
authorAlexey Romanoff <ar@logiceditor.com>2021-08-15 15:17:28 +0300
committerAlexey Romanoff <ar@logiceditor.com>2021-08-16 16:35:07 +0300
commit7668d9076da6e2ae9e220eafb5c6ee1e933c088d (patch)
treec2d8e3bdd0d6d189572bd50d8d9a078097fcc3b5 /lpcode.h
parent635a51b5c88e958c27b26e049c639ea774946367 (diff)
downloadlpeglabel-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 'lpcode.h')
-rw-r--r--lpcode.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/lpcode.h b/lpcode.h
deleted file mode 100644
index bdd3ec1..0000000
--- a/lpcode.h
+++ /dev/null
@@ -1,40 +0,0 @@
1/*
2** $Id: lpcode.h $
3*/
4
5#if !defined(lpcode_h)
6#define lpcode_h
7
8#include "lua.h"
9
10#include "lptypes.h"
11#include "lptree.h"
12#include "lpvm.h"
13
14LUAI_FUNC int tocharset (TTree *tree, Charset *cs);
15LUAI_FUNC int checkaux (TTree *tree, int pred);
16LUAI_FUNC int fixedlen (TTree *tree);
17LUAI_FUNC int hascaptures (TTree *tree);
18LUAI_FUNC int lp_gc (lua_State *L);
19LUAI_FUNC Instruction *compile (lua_State *L, Pattern *p);
20LUAI_FUNC void realloccode (lua_State *L, Pattern *p, int nsize);
21LUAI_FUNC int sizei (const Instruction *i);
22
23
24#define PEnullable 0
25#define PEnofail 1
26
27/*
28** nofail(t) implies that 't' cannot fail with any input
29*/
30#define nofail(t) checkaux(t, PEnofail)
31
32/*
33** (not nullable(t)) implies 't' cannot match without consuming
34** something
35*/
36#define nullable(t) checkaux(t, PEnullable)
37
38
39
40#endif