From 63c94b1e74f3272dbf0b2bc1dae8913d564c72f5 Mon Sep 17 00:00:00 2001 From: Jose Antonio Ortega Ruiz Date: Sat, 5 Aug 2006 23:47:57 +0000 Subject: All tests passing again (mix parser re-entrant) git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-17 --- mixlib/mix_scanner.l | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'mixlib/mix_scanner.l') diff --git a/mixlib/mix_scanner.l b/mixlib/mix_scanner.l index 1ad8eaa..db76057 100644 --- a/mixlib/mix_scanner.l +++ b/mixlib/mix_scanner.l @@ -168,7 +168,7 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)* yy_flex_debug = getenv("FLEX_DEBUG"); #endif yyin = mix_file_to_FILE (parser->in_file); - + yyrestart (yyin); %} @@ -180,13 +180,19 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)* { ^\*.* /* eat comments */ . { - if ( end ) return parser->status; + if (end) + { + return parser->status; + } yyless (0); BEGIN (LOC); } \n { ++lineno; - if ( end ) return parser->status; + if (end) + { + return parser->status; + } } } @@ -342,6 +348,8 @@ wexpr {expr}({fpart})?(,{expr}({fpart})?)* parser->end = parser->loc_count; end = TRUE; if ( parser->status == MIX_PERR_NOCOMP ) parser->status = MIX_PERR_OK; + RESET (); + BEGIN (INITIAL); return parser->status; } } -- cgit v1.2.3