summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--grammar/grammar.y2
-rw-r--r--grammar/lexer.l7
-rwxr-xr-xtests/diag.sh4
3 files changed, 9 insertions, 4 deletions
diff --git a/grammar/grammar.y b/grammar/grammar.y
index 65793fb1..f455a21f 100644
--- a/grammar/grammar.y
+++ b/grammar/grammar.y
@@ -66,6 +66,7 @@ extern int yyerror(char*);
%token BEGIN_TPL
%token STOP
%token <s> LEGACY_ACTION
+%token <s> LEGACY_RULESET
%token <s> PRIFILT
%token <s> PROPFILT
%token <s> BSD_TAG_SELECTOR
@@ -123,6 +124,7 @@ extern int yyerror(char*);
conf: /* empty (to end recursion) */
| conf obj { cnfDoObj($2); }
| conf stmt { cnfDoScript($2); }
+ | conf LEGACY_RULESET { cnfDoCfsysline($2); }
| conf BSD_TAG_SELECTOR { cnfDoBSDTag($2); }
| conf BSD_HOST_SELECTOR { cnfDoBSDHost($2); }
obj: BEGINOBJ nvlst ENDOBJ { $$ = cnfobjNew($1, $2); }
diff --git a/grammar/lexer.l b/grammar/lexer.l
index c52e5a01..14e95e81 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -137,8 +137,8 @@ int fileno(FILE *stream);
/* line number support because the "preprocessor" combines lines and so needs
* to tell us the real source line.
*/
-"stop" { dbgprintf("STOP\n"); return STOP; }
-"else" { dbgprintf("STOP\n"); return ELSE; }
+"stop" { return STOP; }
+"else" { return ELSE; }
"preprocfilelinenumber(" { BEGIN LINENO; }
<LINENO>[0-9]+ { yylineno = atoi(yytext) - 1; }
<LINENO>")" { BEGIN INITIAL; }
@@ -191,6 +191,9 @@ int fileno(FILE *stream);
if(!strncasecmp(yytext, "$includeconfig ", 14)) {
yyless(14);
BEGIN INCL;
+ } else if(!strncasecmp(yytext, "$ruleset ", 8)) {
+ yylval.s = strdup(yytext);
+ return LEGACY_RULESET;
} else {
cnfDoCfsysline(strdup(yytext));
}
diff --git a/tests/diag.sh b/tests/diag.sh
index ed0709da..b278d2c5 100755
--- a/tests/diag.sh
+++ b/tests/diag.sh
@@ -10,8 +10,8 @@
#valgrind="valgrind --tool=helgrind --log-fd=1"
#valgrind="valgrind --tool=exp-ptrcheck --log-fd=1"
#set -o xtrace
-export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
-export RSYSLOG_DEBUGLOG="log"
+#export RSYSLOG_DEBUG="debug nologfuncflow noprintmutexaction nostdout"
+#export RSYSLOG_DEBUGLOG="log"
case $1 in
'init') $srcdir/killrsyslog.sh # kill rsyslogd if it runs for some reason
cp $srcdir/testsuites/diag-common.conf diag-common.conf