diff options
author | Vern Paxson <vern@ee.lbl.gov> | 1990-03-20 11:36:04 +0000 |
---|---|---|
committer | Vern Paxson <vern@ee.lbl.gov> | 1990-03-20 11:36:04 +0000 |
commit | 58d7f1822a723d8b0980c0d31eeacbd8501ea1cf (patch) | |
tree | 6049cc6577a8d8ba4a4c07c9a9adaf7c2b1a9479 /scan.l | |
parent | fc25bea0a9caae2cf9bcbe36591fb51bf2062aaa (diff) |
Removed malloc() declaration.
Added detection of EOF in actions.
Diffstat (limited to 'scan.l')
-rw-r--r-- | scan.l | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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_STRING>\" ACTION_ECHO; BEGIN(ACTION); <ACTION_STRING>. ACTION_ECHO; +<ACTION,ACTION_COMMENT,ACTION_STRING><<EOF>> { + synerr( "EOF encountered inside an action" ); + yyterminate(); + } + <SECT2,QUOTE,CCL>{ESCSEQ} { yylval = myesc( yytext ); |