From a41f3c34ab7d0e4e19d69f25f3c85d96966b8067 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 21 Sep 2012 18:01:21 +0200 Subject: 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. --- grammar/lexer.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]* | -- cgit v1.2.3