]> granicus.if.org Git - flex/commitdiff
'-' means stdin
authorVern Paxson <vern@ee.lbl.gov>
Thu, 20 Apr 1995 11:35:12 +0000 (11:35 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Thu, 20 Apr 1995 11:35:12 +0000 (11:35 +0000)
octal escape sequence must just be digits 0-7

scan.l

diff --git a/scan.l b/scan.l
index c986bf5ae9f6f40bf76b94aee2994757db0834c0..bb4faaaad11b16d0ac2632229d4e26d77a765a3a 100644 (file)
--- a/scan.l
+++ b/scan.l
@@ -83,7 +83,7 @@ NOT_NAME      [^[:alpha:]_*\n]+
 
 SCNAME         {NAME}
 
-ESCSEQ         (\\([^\n]|[[:digit:]]{1,3}|x[[:xdigit:]]{1,2}))
+ESCSEQ         (\\([^\n]|[0-7]{1,3}|x[[:xdigit:]]{1,2}))
 
 FIRST_CCL_CHAR ([^\\\n]|{ESCSEQ})
 CCL_CHAR       ([^\\\n\]]|{ESCSEQ})
@@ -668,7 +668,7 @@ int yywrap()
 void set_input_file( file )
 char *file;
        {
-       if ( file )
+       if ( file && strcmp( file, "-" ) )
                {
                infilename = copy_string( file );
                yyin = fopen( infilename, "r" );