summaryrefslogtreecommitdiffstats
path: root/grammar/rscript.l
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-04 11:57:55 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-04 11:57:55 +0200
commitb966576f1e740966b35579d612050f4dfc09606c (patch)
treec77e7e97d79c9e898ec5156807b9699aba264720 /grammar/rscript.l
parent4598557192c46e43edc5cc09b89c30045aacdb33 (diff)
downloadrsyslog-b966576f1e740966b35579d612050f4dfc09606c.tar.gz
rsyslog-b966576f1e740966b35579d612050f4dfc09606c.tar.xz
rsyslog-b966576f1e740966b35579d612050f4dfc09606c.zip
milestone: added BSD-style blocks
Diffstat (limited to 'grammar/rscript.l')
-rw-r--r--grammar/rscript.l8
1 files changed, 6 insertions, 2 deletions
diff --git a/grammar/rscript.l b/grammar/rscript.l
index 7e7ab925..a4c37c81 100644
--- a/grammar/rscript.l
+++ b/grammar/rscript.l
@@ -122,9 +122,10 @@ char *currfn; /* name of currently processed file */
^[ \t]*[,\*a-z]+\.[,!=;\.\*a-z]+ { printf("token prifilt '%s'\n", yytext); yylval.s = strdup(yytext); return PRIFILT; }
"*" |
+\-\/[^*][^\n]* |
\/[^*][^\n]* |
[\|\.\-\@:~][^\n]+ |
-[a-z0-9_\-\+]+ { yylval.s = strdup(yytext); return LEGACY_ACTION; }
+[a-z0-9_][a-z0-9_\-\+]* { yylval.s = strdup(yytext); printf("LEGACY_ACT: '%s'\n", yytext);return LEGACY_ACTION; }
<INOBJ>")" { BEGIN INITIAL; return ENDOBJ; }
<INOBJ>[a-z][a-z0-9_\.]* { yylval.estr = es_newStrFromCStr(yytext, yyleng);
return NAME; }
@@ -141,7 +142,6 @@ char *currfn; /* name of currently processed file */
<INOBJ>[ \n\t]
<INOBJ>. { printf("INOBJ: invalid char '%s'\n", yytext); }
- /* CFSYSLINE is valid in all modes */
\$[a-z]+.*$ { /* see common on $IncludeConfig above */
if(!strncasecmp(yytext, "$includeconfig ", 14)) {
yyless(14);
@@ -151,6 +151,10 @@ char *currfn; /* name of currently processed file */
return CFSYSLINE;
}
}
+![^ \t\n]+[ \t]*$ { printf("BSD TAG '%s'\n", yytext); yylval.s = strdup(yytext); return BSD_TAG_SELECTOR; }
+[+-]\*[ \t\n]*#.*$ { printf("BSD HOST '%s'\n", yytext); yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; }
+[+-]\*[ \t\n]*$ { printf("BSD HOST '%s'\n", yytext); yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; }
+^[ \t]*[+-][a-z0-9.:-]+[ \t]*$ { printf("BSD HOST '%s'\n", yytext); yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; }
\#.*\n /* skip comments in input */
[\n\t ] /* drop whitespace */