summaryrefslogtreecommitdiffstats
path: root/grammar/utils.h
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-04 16:00:26 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-04 16:00:26 +0200
commit460010068b1d46c23829e7106380ffb8527df949 (patch)
treed8fbd4284d6769f5659d5d4cd6c71d5509c03fa1 /grammar/utils.h
parentbffa39ab9539c0e26dbbfb450f42de93638292e1 (diff)
downloadrsyslog-460010068b1d46c23829e7106380ffb8527df949.tar.gz
rsyslog-460010068b1d46c23829e7106380ffb8527df949.tar.bz2
rsyslog-460010068b1d46c23829e7106380ffb8527df949.zip
milestone: strings and vars are now stored correctly in in-memory representation
Diffstat (limited to 'grammar/utils.h')
-rw-r--r--grammar/utils.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/grammar/utils.h b/grammar/utils.h
index 9dfac5b1..fb1462a3 100644
--- a/grammar/utils.h
+++ b/grammar/utils.h
@@ -60,6 +60,12 @@ struct cnfactlst {
/* the following structures support expressions, and may (very much later
* be the sole foundation for the AST.
+ *
+ * nodetypes (list not yet complete)
+ * S - string
+ * N - number
+ * V - var
+ * R - rule
*/
enum cnfFiltType { CNFFILT_NONE, CNFFILT_PRI, CNFFILT_PROP, CNFFILT_SCRIPT };
static inline char*
@@ -105,6 +111,11 @@ struct cnfstringval {
es_str_t *estr;
};
+struct cnfvar {
+ unsigned nodetype;
+ char *name;
+};
+
/* future extensions
struct x {
int nodetype;
@@ -140,6 +151,7 @@ struct cnfnumval* cnfnumvalNew(long long val);
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);
/* debug helper */
void cstrPrint(char *text, es_str_t *estr);