summaryrefslogtreecommitdiffstats
path: root/grammar
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2011-07-09 17:33:12 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2011-07-09 17:33:12 +0200
commitda6489743cd31a7896f17f5500dbfd18e0560260 (patch)
tree2683a7a5cb143bbdddf1bfc961fcd8fe6edaab7a /grammar
parent59f8ebdba75d693f7b462f51b7b50136b590dea7 (diff)
downloadrsyslog-da6489743cd31a7896f17f5500dbfd18e0560260.tar.gz
rsyslog-da6489743cd31a7896f17f5500dbfd18e0560260.tar.xz
rsyslog-da6489743cd31a7896f17f5500dbfd18e0560260.zip
milestone/[PARTWORK]: made sure all legacy selectors work
... except for the not guaranteed $outchannel construct, which we could not fix without syntax change. Shouldn't hurt too many.
Diffstat (limited to 'grammar')
-rw-r--r--grammar/grammar.y1
-rw-r--r--grammar/lexer.l3
2 files changed, 3 insertions, 1 deletions
diff --git a/grammar/grammar.y b/grammar/grammar.y
index b8790411..402b1a57 100644
--- a/grammar/grammar.y
+++ b/grammar/grammar.y
@@ -63,6 +63,7 @@ extern int yyerror(char*);
%token ENDOBJ
%token <s> CFSYSLINE
%token BEGIN_ACTION
+%token STOP
%token <s> LEGACY_ACTION
%token <s> PRIFILT
%token <s> PROPFILT
diff --git a/grammar/lexer.l b/grammar/lexer.l
index 347a2a7a..802b2d89 100644
--- a/grammar/lexer.l
+++ b/grammar/lexer.l
@@ -134,6 +134,7 @@ 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; }
"preprocfilelinenumber(" { BEGIN LINENO; }
<LINENO>[0-9]+ { yylineno = atoi(yytext) - 1; }
<LINENO>")" { BEGIN INITIAL; }
@@ -159,7 +160,7 @@ int fileno(FILE *stream);
\-\/[^*][^\n]* |
\/[^*][^\n]* |
:[a-z0-9]+:[^\n]* |
-[\|\.\-\@~][^\n]+ |
+[\|\.\-\@\^?~>][^\n]+ |
[a-z0-9_][a-z0-9_\-\+]* { yylval.s = strdup(yytext);
// printf("lex: LEGA ACT: '%s'\n", yytext);
return LEGACY_ACTION; }