summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-09-21 18:01:21 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-09-21 18:01:21 +0200
commita41f3c34ab7d0e4e19d69f25f3c85d96966b8067 (patch)
treed51af414aa2d28f4453f09902a3c7ca6fc7d8bd9 /grammar
parent1be79d5467badd914ddc5762a6510a304140ef5e (diff)
downloadrsyslog-a41f3c34ab7d0e4e19d69f25f3c85d96966b8067.tar.gz
rsyslog-a41f3c34ab7d0e4e19d69f25f3c85d96966b8067.tar.xz
rsyslog-a41f3c34ab7d0e4e19d69f25f3c85d96966b8067.zip
Implemented different grammar for pri filters
The method introduced by the previous commit caused issues in v7 as it was too generic. Most importantly, it permitted simple words (like "stop") to (invalidly) be detected as pri filters. Now, the grammar is close to the initial one, and each pri filter must at least have a comma or a period inside it, which does not conflict with simple words.
Diffstat (limited to 'grammar')
-rw-r--r--grammar/lexer.l2
1 files changed, 1 insertions, 1 deletions
diff --git a/grammar/lexer.l b/grammar/lexer.l
index caa0f24d..f03659c3 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -164,7 +164,7 @@ int fileno(FILE *stream);
"action"[ \n\t]*"(" { BEGIN INOBJ; return BEGIN_ACTION; }
^[ \t]*:\$?[a-z\-]+[ ]*,[ ]*!?[a-z]+[ ]*,[ ]*\".*\" {
yylval.s = strdup(yytext); return PROPFILT; }
-^[ \t]*[\*a-z][,\*a-z]*[0-7]*[,!=;\.\*a-z0-7]+ { yylval.s = strdup(yytext); return PRIFILT; }
+^[ \t]*[\*a-z][\*a-z]*[0-7]*[\.,][,!=;\.\*a-z0-7]+ { yylval.s = strdup(yytext); return PRIFILT; }
"~" |
"*" |
\-\/[^*][^\n]* |