From 13b49db876f3d0443d201d4a080c4929c00556a5 Mon Sep 17 00:00:00 2001 From: stefanjones Date: Thu, 26 Jun 2003 13:54:49 +0000 Subject: [PATCH] Modified Files: ifs_lex.l Add BEGIN(INITIAL) to reset the internal condition as yyrestart doesn't do so --- src/xspice/cmpp/ifs_lex.l | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/xspice/cmpp/ifs_lex.l b/src/xspice/cmpp/ifs_lex.l index 8a96365e9..2d1df697d 100755 --- a/src/xspice/cmpp/ifs_lex.l +++ b/src/xspice/cmpp/ifs_lex.l @@ -86,7 +86,9 @@ E [eE][+-]?{D}+ \n /* new line */ -<> {ifs_yyerror ("Unterminated comment"); yyterminate(); } +<> {ifs_yyerror ("Unterminated comment"); + BEGIN(INITIAL); + yyterminate(); } "*"+"/" { BEGIN(INITIAL); } @@ -96,8 +98,9 @@ E [eE][+-]?{D}+ "\"" { BEGIN(INITIAL); } -<> {ifs_yyerror ("Unterminated string literal"); - yyterminate(); } +<> {ifs_yyerror ("Unterminated string literal"); + BEGIN(INITIAL); + yyterminate(); } allowed_types{W}*: {BEGIN CTYPE; return TOK_ALLOWED_TYPES;} vector{W}*: {BEGIN BOOL; return TOK_ARRAY;}