summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-11 16:51:30 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-11 16:51:30 +0200
commitcefa1fac08d4d67a4139146016fef206d59d5ddc (patch)
treec269d3cfbeca3cff0d9d6065c38ce0a5bd5f924b /grammar
parent05ff79aa1f928e42bf9883e946923353eb2925ac (diff)
downloadrsyslog-cefa1fac08d4d67a4139146016fef206d59d5ddc.tar.gz
rsyslog-cefa1fac08d4d67a4139146016fef206d59d5ddc.tar.xz
rsyslog-cefa1fac08d4d67a4139146016fef206d59d5ddc.zip
fixed lexer: facilities local0-local7 were not correctly handled
Diffstat (limited to 'grammar')
-rw-r--r--grammar/lexer.l6
1 files changed, 5 insertions, 1 deletions
diff --git a/grammar/lexer.l b/grammar/lexer.l
index 64a804fa..d56b4fc2 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -80,6 +80,8 @@ char *currfn; /* name of currently processed file */
int popfile(void);
int cnfSetLexFile(char *fname);
+extern int yydebug;
+
/* somehow, I need these prototype even though the headers are
* included. I guess that's some autotools magic I don't understand...
*/
@@ -155,7 +157,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]+ { yylval.s = strdup(yytext); return PRIFILT; }
+^[ \t]*[a-z][,\*a-z]*[0-7]*\.[,!=;\.\*a-z]+ { yylval.s = strdup(yytext); return PRIFILT; }
"*" |
\-\/[^*][^\n]* |
\/[^*][^\n]* |
@@ -203,6 +205,8 @@ cnfParseBuffer(char *buf, unsigned lenBuf)
{
struct bufstack *bs;
int r = 0;
+ yydebug = 1;
+ BEGIN INITIAL;
/* maintain stack */
if((bs = malloc(sizeof(struct bufstack))) == NULL) {
r = 1;