diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-08-25 17:17:27 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-08-25 17:17:27 +0200 |
commit | 76e9968c0890cb4db068c953db6e6574b6c28da0 (patch) | |
tree | 75f9e4be5663a3e2dd877619d4559b05b3859bf3 /grammar/grammar.y | |
parent | 6258cb42fd407b9388de63c746634b4df03e78eb (diff) | |
download | rsyslog-76e9968c0890cb4db068c953db6e6574b6c28da0.tar.gz rsyslog-76e9968c0890cb4db068c953db6e6574b6c28da0.tar.xz rsyslog-76e9968c0890cb4db068c953db6e6574b6c28da0.zip |
milestone: LIST-type templates work, but no all options yet present
Diffstat (limited to 'grammar/grammar.y')
-rw-r--r-- | grammar/grammar.y | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/grammar/grammar.y b/grammar/grammar.y index d91eb3bb..27d0e1d5 100644 --- a/grammar/grammar.y +++ b/grammar/grammar.y @@ -137,13 +137,10 @@ obj: BEGINOBJ nvlst ENDOBJ { $$ = cnfobjNew($1, $2); } | BEGIN_TPL nvlst ENDOBJ '{' propconst '}' { $$ = cnfobjNew(CNFOBJ_TPL, $2); $$->subobjs = $5; - dbgprintf("processing template() WITH {}\n"); } + dbgprintf("processing template() WITH {}, subobj=%p\n", $5); } propconst: { $$ = NULL; } - | propconst property { if($1 == NULL) - $$ = objlstNew($2); - else - $1->next = objlstNew($2); } - | propconst constant { /*$2->next = $1; $$ = $2;*/ } + | propconst property { $$ = objlstAdd($1, $2); } + | propconst constant { $$ = objlstAdd($1, $2); } property: BEGIN_PROPERTY nvlst ENDOBJ { $$ = cnfobjNew(CNFOBJ_PROPERTY, $2); dbgprintf("processed property()\n"); } constant: BEGIN_CONSTANT nvlst ENDOBJ { $$ = cnfobjNew(CNFOBJ_CONSTANT, $2); |