diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-08-24 15:08:12 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-08-24 15:08:12 +0200 |
commit | ab7b1b381a467d6a61760a5cb84ef804a74598f1 (patch) | |
tree | dcc737c05f7665ccc09a37bf3d2066a2ab2e21ac /grammar/grammar.y | |
parent | 2f4292a81c2bf89b349f0e276c69616ac6e51164 (diff) | |
download | rsyslog-ab7b1b381a467d6a61760a5cb84ef804a74598f1.tar.gz rsyslog-ab7b1b381a467d6a61760a5cb84ef804a74598f1.tar.xz rsyslog-ab7b1b381a467d6a61760a5cb84ef804a74598f1.zip |
add base plumbing for template() config object to grammar
Diffstat (limited to 'grammar/grammar.y')
-rw-r--r-- | grammar/grammar.y | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/grammar/grammar.y b/grammar/grammar.y index 402b1a57..35afae30 100644 --- a/grammar/grammar.y +++ b/grammar/grammar.y @@ -63,6 +63,9 @@ extern int yyerror(char*); %token ENDOBJ %token <s> CFSYSLINE %token BEGIN_ACTION +%token BEGIN_PROPERTY +%token BEGIN_CONSTANT +%token BEGIN_TPL %token STOP %token <s> LEGACY_ACTION %token <s> PRIFILT @@ -89,7 +92,7 @@ extern int yyerror(char*); %token CMP_STARTSWITHI %type <nvlst> nv nvlst -%type <obj> obj +%type <obj> obj propconst %type <actlst> actlst %type <actlst> act %type <s> cfsysline @@ -128,6 +131,15 @@ conf: /* empty (to end recursion) */ | conf BSD_HOST_SELECTOR { cnfDoBSDHost($2); } obj: BEGINOBJ nvlst ENDOBJ { $$ = cnfobjNew($1, $2); } | BEGIN_ACTION nvlst ENDOBJ { $$ = cnfobjNew(CNFOBJ_ACTION, $2); } + | BEGIN_TPL nvlst ENDOBJ { $$ = cnfobjNew(CNFOBJ_TPL, $2); dbgprintf("processing template() without {}\n"); } + | BEGIN_TPL nvlst ENDOBJ '{' propconst '}' + { $$ = cnfobjNew(CNFOBJ_TPL, $2); dbgprintf("processing template() WITH {}\n"); } +/* TODO: NOTE: + propconst is the NEXT step. It is just included as an experiment and needs + to be replaced. +*/ +propconst: BEGIN_PROPERTY nvlst ENDOBJ { $$ = cnfobjNew(CNFOBJ_PROPERTY, $2); + dbgprintf("processed property()\n"); } cfsysline: CFSYSLINE { $$ = $1; } nvlst: { $$ = NULL; } | nvlst nv { $2->next = $1; $$ = $2; } |