From: Vern Paxson Date: Sat, 12 Jun 1993 13:42:49 +0000 (+0000) Subject: Fixed bug in lex % directives X-Git-Tag: flex-2-5-5b~441 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=417e9e8e9a9c43b3f1bae61de9c83073351a6e2f;p=flex Fixed bug in lex % directives --- diff --git a/scan.l b/scan.l index 0566a2b..ee87937 100644 --- a/scan.l +++ b/scan.l @@ -113,8 +113,8 @@ CCL_CHAR [^\\\n\]]|{ESCSEQ} return SECTEND; } -^"%pointer".*\n ++linenum; yytext_is_array = false; -^"%array".*\n ++linenum; yytext_is_array = true; +^"%pointer".*{NL} ++linenum; yytext_is_array = false; +^"%array".*{NL} ++linenum; yytext_is_array = true; ^"%used" { warn( "%used/%unused have been deprecated" ); @@ -126,9 +126,9 @@ CCL_CHAR [^\\\n\]]|{ESCSEQ} } -^"%"[aceknopr]{WS}.*{NL} ++linenum; /* ignore */ +^"%"[aceknopr]{OPTWS}[0-9]*{OPTWS}{NL} ++linenum; /* ignore */ -^"%"[^sxanpekotcru{}]{OPTWS} synerr( "unrecognized '%' directive" ); +^"%"[^sxanpekotcru{}].* synerr( "unrecognized '%' directive" ); ^{NAME} { (void) strcpy( nmstr, (char *) yytext );