diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-15 18:03:02 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-07-15 18:03:02 +0200 |
commit | 63d357862051fd8fea4e26bd424bdfc0e837a158 (patch) | |
tree | a1d9b8ba9e109844bba8fe9dae00d87b1249302e | |
parent | 162b409c2c8d3e33e6dbc7543862a9b82baaa44d (diff) | |
download | rsyslog-63d357862051fd8fea4e26bd424bdfc0e837a158.tar.gz rsyslog-63d357862051fd8fea4e26bd424bdfc0e837a158.tar.xz rsyslog-63d357862051fd8fea4e26bd424bdfc0e837a158.zip |
removed some printf's left in lexer
may cause some mild confusion if someone actually uses
the not-yet-officially-supported construct
-rw-r--r-- | grammar/lexer.l | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/grammar/lexer.l b/grammar/lexer.l index 760ed903..5ad646ad 100644 --- a/grammar/lexer.l +++ b/grammar/lexer.l @@ -64,6 +64,7 @@ #include <strings.h> #include <libestr.h> #include "rainerscript.h" +#include "parserif.h" #include "grammar.h" static int preCommentState; /* save for lex state before a comment */ @@ -128,11 +129,11 @@ int fileno(FILE *stream); <EXPR>[ \t\n] <EXPR>[a-z][a-z0-9_]* { yylval.estr = es_newStrFromCStr(yytext, yyleng); return FUNC; } -<EXPR>. { printf("invalid char in expr: %s\n", yytext); } +<EXPR>. { dbgprintf("invalid char in expr: %s\n", yytext); } "&" { return '&'; } "{" { return '{'; } "}" { return '}'; } -"ruleset" { printf("RULESET\n"); } +"ruleset" { dbgprintf("RULESET\n"); } /* line number support because the "preprocessor" combines lines and so needs * to tell us the real source line. */ @@ -180,7 +181,7 @@ int fileno(FILE *stream); <COMMENT>([^*]|\n)+|. <INOBJ>#.*$ /* skip comments in input */ <INOBJ>[ \n\t] -<INOBJ>. { printf("INOBJ: invalid char '%s'\n", yytext); } +<INOBJ>. { dbgprintf("INOBJ: invalid char '%s'\n", yytext); } \$[a-z]+.*$ { /* see common on $IncludeConfig above */ if(!strncasecmp(yytext, "$includeconfig ", 14)) { yyless(14); @@ -196,7 +197,7 @@ int fileno(FILE *stream); ^[ \t]*[+-][a-z0-9.:-]+[ \t]*$ { yylval.s = strdup(yytext); return BSD_HOST_SELECTOR; } \#.*\n /* skip comments in input */ [\n\t ] /* drop whitespace */ -. { printf("invalid char: %s\n", yytext); +. { dbgprintf("invalid char: %s\n", yytext); } <<EOF>> { if(popfile() != 0) yyterminate(); } |