From 63d357862051fd8fea4e26bd424bdfc0e837a158 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 15 Jul 2011 18:03:02 +0200 Subject: removed some printf's left in lexer may cause some mild confusion if someone actually uses the not-yet-officially-supported construct --- grammar/lexer.l | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'grammar') 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 #include #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); [ \t\n] [a-z][a-z0-9_]* { yylval.estr = es_newStrFromCStr(yytext, yyleng); return FUNC; } -. { printf("invalid char in expr: %s\n", yytext); } +. { 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); ([^*]|\n)+|. #.*$ /* skip comments in input */ [ \n\t] -. { printf("INOBJ: invalid char '%s'\n", yytext); } +. { 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); } <> { if(popfile() != 0) yyterminate(); } -- cgit