diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-28 11:06:16 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-09-28 11:06:16 +0200 |
commit | 38cdf1abaddea47aa5e9d11d97fade6a2455b632 (patch) | |
tree | 7676ef3216c6f322a47c5a0840a44c3ab0fc3029 /grammar/grammar.y | |
parent | b0764541ab2f2d0448ca79564479bb5865a02ecf (diff) | |
download | rsyslog-38cdf1abaddea47aa5e9d11d97fade6a2455b632.tar.gz rsyslog-38cdf1abaddea47aa5e9d11d97fade6a2455b632.tar.xz rsyslog-38cdf1abaddea47aa5e9d11d97fade6a2455b632.zip |
Implement RainerScript ruleset() statement
Diffstat (limited to 'grammar/grammar.y')
-rw-r--r-- | grammar/grammar.y | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/grammar/grammar.y b/grammar/grammar.y index ce749807..fcb9119b 100644 --- a/grammar/grammar.y +++ b/grammar/grammar.y @@ -64,6 +64,7 @@ extern int yyerror(char*); %token BEGIN_PROPERTY %token BEGIN_CONSTANT %token BEGIN_TPL +%token BEGIN_RULESET %token STOP %token SET %token UNSET @@ -135,6 +136,10 @@ obj: BEGINOBJ nvlst ENDOBJ { $$ = cnfobjNew($1, $2); } { $$ = cnfobjNew(CNFOBJ_TPL, $2); $$->subobjs = $5; } + | BEGIN_RULESET nvlst ENDOBJ '{' stmt '}' + { $$ = cnfobjNew(CNFOBJ_RULESET, $2); + $$->script = $5; + } propconst: { $$ = NULL; } | propconst property { $$ = objlstAdd($1, $2); } | propconst constant { $$ = objlstAdd($1, $2); } |