mirror of
https://github.com/rspamd/rspamd.git
synced 2024-08-26 17:54:48 +02:00
41 lines
745 B
C
41 lines
745 B
C
/*
|
|
** $Id: lpcode.h $
|
|
*/
|
|
|
|
#if !defined(lpcode_h)
|
|
#define lpcode_h
|
|
|
|
#include "lua.h"
|
|
|
|
#include "lptypes.h"
|
|
#include "lptree.h"
|
|
#include "lpvm.h"
|
|
|
|
int tocharset (TTree *tree, Charset *cs);
|
|
int checkaux (TTree *tree, int pred);
|
|
int fixedlen (TTree *tree);
|
|
int hascaptures (TTree *tree);
|
|
int lp_gc (lua_State *L);
|
|
Instruction *compile (lua_State *L, Pattern *p);
|
|
void realloccode (lua_State *L, Pattern *p, int nsize);
|
|
int sizei (const Instruction *i);
|
|
|
|
|
|
#define PEnullable 0
|
|
#define PEnofail 1
|
|
|
|
/*
|
|
** nofail(t) implies that 't' cannot fail with any input
|
|
*/
|
|
#define nofail(t) checkaux(t, PEnofail)
|
|
|
|
/*
|
|
** (not nullable(t)) implies 't' cannot match without consuming
|
|
** something
|
|
*/
|
|
#define nullable(t) checkaux(t, PEnullable)
|
|
|
|
|
|
|
|
#endif
|