|Restarting lex portably (or flex) firstname.lastname@example.org (1991-02-16)|
|Re: Restarting lex portably (or flex) email@example.com (1991-02-21)|
|From:||firstname.lastname@example.org (Sean Barrett)|
|Date:||Sat, 16 Feb 91 18:12:09 -0500|
Is there a way to start lex processing a new file when the
previous one was *not* processed all the way to end-of-file?
[e.g. aborted compilation due to compiling].
flex provides yyrestart(FILE *f), but the wording of the
documentation is very consistent in saying 'after end-of-file
is reached on the previous file'; however, it is unclear whether
the documentation author meant it was a precondition.
Examining the lex output on my machine here reveals that
only an internal buffer pointer (yysptr I think) needs to
be reset, but I imagine this would not be portable.
I would prefer a solution for lex, but barring that,
a clarification of yyrestart() in flex would be useful.
[Lex lets you define its input macros any way you want. -John]
Return to the
Search the comp.compilers archives again.