From 417e9e8e9a9c43b3f1bae61de9c83073351a6e2f Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Sat, 12 Jun 1993 13:42:49 +0000 Subject: [PATCH] Fixed bug in lex % directives --- scan.l | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 ); -- 2.50.1