summaryrefslogtreecommitdiffstats
path: root/grammar/rainerscript.h
diff options
context:
space:
mode:
Diffstat (limited to 'grammar/rainerscript.h')
-rw-r--r--grammar/rainerscript.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/grammar/rainerscript.h b/grammar/rainerscript.h
index e11ae62f..5ff71bee 100644
--- a/grammar/rainerscript.h
+++ b/grammar/rainerscript.h
@@ -163,7 +163,8 @@ enum cnffuncid {
CNFFUNC_GETENV,
CNFFUNC_TOLOWER,
CNFFUNC_CSTR,
- CNFFUNC_CNUM
+ CNFFUNC_CNUM,
+ CNFFUNC_RE_MATCH
};
struct cnffunc {
@@ -171,6 +172,7 @@ struct cnffunc {
es_str_t *fname;
unsigned short nParams;
enum cnffuncid fID; /* function ID for built-ins, 0 means use name */
+ void *funcdata; /* global data for function-specific use (e.g. compiled regex) */
struct cnfexpr *expr[];
};
@@ -233,6 +235,7 @@ struct cnfexpr* cnfexprNew(unsigned nodetype, struct cnfexpr *l, struct cnfexpr
void cnfexprPrint(struct cnfexpr *expr, int indent);
void cnfexprEval(struct cnfexpr *expr, struct var *ret, void *pusr);
int cnfexprEvalBool(struct cnfexpr *expr, void *usrptr);
+void cnfexprDestruct(struct cnfexpr *expr);
struct cnfnumval* cnfnumvalNew(long long val);
struct cnfstringval* cnfstringvalNew(es_str_t *estr);
struct cnfrule * cnfruleNew(enum cnfFiltType filttype, struct cnfactlst *actlst);
@@ -249,6 +252,7 @@ void cnfparamsPrint(struct cnfparamblk *params, struct cnfparamvals *vals);
void varDelete(struct var *v);
void cnfparamvalsDestruct(struct cnfparamvals *paramvals, struct cnfparamblk *blk);
void cnfcfsyslinelstDestruct(struct cnfcfsyslinelst *cfslst);
+rsRetVal initRainerscript(void);
/* debug helper */
void cstrPrint(char *text, es_str_t *estr);