From 58d7f1822a723d8b0980c0d31eeacbd8501ea1cf Mon Sep 17 00:00:00 2001 From: Vern Paxson Date: Tue, 20 Mar 1990 11:36:04 +0000 Subject: Removed malloc() declaration. Added detection of EOF in actions. --- scan.l | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scan.l b/scan.l index ee9a2be..922f0d2 100644 --- a/scan.l +++ b/scan.l @@ -132,8 +132,6 @@ ESCSEQ \\([^\n]|[0-9]{1,3}|x[0-9a-f]{1,2}) ^"%"[cr]{OPTWS} /* ignore old lex directive */ %t{OPTWS}\n { - char *malloc(); - ++linenum; xlation = (int *) malloc( sizeof( int ) * csize ); @@ -476,6 +474,11 @@ ESCSEQ \\([^\n]|[0-9]{1,3}|x[0-9a-f]{1,2}) \" ACTION_ECHO; BEGIN(ACTION); . ACTION_ECHO; +<> { + synerr( "EOF encountered inside an action" ); + yyterminate(); + } + {ESCSEQ} { yylval = myesc( yytext ); -- cgit v1.2.3