]> granicus.if.org Git - flex/commitdiff
Fixed bug in lex % directives
authorVern Paxson <vern@ee.lbl.gov>
Sat, 12 Jun 1993 13:42:49 +0000 (13:42 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Sat, 12 Jun 1993 13:42:49 +0000 (13:42 +0000)
scan.l

diff --git a/scan.l b/scan.l
index 0566a2bb8943f42639855b133b8e1b316286cd82..ee879378da0f47d51bae2feae67bce7547beda99 100644 (file)
--- 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 );