summaryrefslogtreecommitdiffhomepage
path: root/mixlib/mix_scanner.l
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2006-08-05 23:47:57 +0000
committerJose Antonio Ortega Ruiz <jao@gnu.org>2006-08-05 23:47:57 +0000
commit63c94b1e74f3272dbf0b2bc1dae8913d564c72f5 (patch)
treec342b533c5e1bef9cd752f8f1f87e29b4675ee50 /mixlib/mix_scanner.l
parentf25c34aee4fbd3fef2d5bc29ec09ebad88c1b118 (diff)
downloadmdk-63c94b1e74f3272dbf0b2bc1dae8913d564c72f5.tar.gz
mdk-63c94b1e74f3272dbf0b2bc1dae8913d564c72f5.tar.bz2
All tests passing again (mix parser re-entrant)
git-archimport-id: mdk@sv.gnu.org/mdk--devel--1--patch-17
Diffstat (limited to 'mixlib/mix_scanner.l')
-rw-r--r--mixlib/mix_scanner.l14
1 files changed, 11 insertions, 3 deletions
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})?)*
<INITIAL>{
^\*.* /* 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;
}
}