diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-04 18:25:17 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-04 18:25:17 +0200 |
commit | 183641a091a3d7b5eabe4419db4ebd2b6f84934e (patch) | |
tree | d3613b3b5b4a028fb88866ab0d1a1b7baba724cc /grammar/utils.h | |
parent | 3d08f4e0f2dcc0f2216e11104ec43507eab22078 (diff) | |
download | rsyslog-183641a091a3d7b5eabe4419db4ebd2b6f84934e.tar.gz rsyslog-183641a091a3d7b5eabe4419db4ebd2b6f84934e.tar.bz2 rsyslog-183641a091a3d7b5eabe4419db4ebd2b6f84934e.zip |
milestone: added functions to grammar
Diffstat (limited to 'grammar/utils.h')
-rw-r--r-- | grammar/utils.h | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/grammar/utils.h b/grammar/utils.h index fb1462a3..e75105da 100644 --- a/grammar/utils.h +++ b/grammar/utils.h @@ -62,10 +62,12 @@ struct cnfactlst { * be the sole foundation for the AST. * * nodetypes (list not yet complete) - * S - string + * F - function * N - number - * V - var + * P - fparamlst * R - rule + * S - string + * V - var */ enum cnfFiltType { CNFFILT_NONE, CNFFILT_PRI, CNFFILT_PROP, CNFFILT_SCRIPT }; static inline char* @@ -116,6 +118,18 @@ struct cnfvar { char *name; }; +struct cnffparamlst { + unsigned nodetype; /* P */ + struct cnffparamlst *next; + struct cnfexpr *expr; +}; + +struct cnffunc { + unsigned nodetype; + es_str_t *fname; + struct cnffparamlst *paramlst; +}; + /* future extensions struct x { int nodetype; @@ -152,6 +166,8 @@ struct cnfstringval* cnfstringvalNew(es_str_t *estr); struct cnfrule * cnfruleNew(enum cnfFiltType filttype, struct cnfactlst *actlst); void cnfrulePrint(struct cnfrule *rule); struct cnfvar* cnfvarNew(char *name); +struct cnffunc * cnffuncNew(es_str_t *fname, struct cnffparamlst* paramlst); +struct cnffparamlst * cnffparamlstNew(struct cnfexpr *expr, struct cnffparamlst *next); /* debug helper */ void cstrPrint(char *text, es_str_t *estr); |