Piotr Siupa said on Tue, 5 Dec 2023 20:27:15 +0100 >Fragment from the manual >(https://westes.github.io/flex/manual/Generated-Scanner.html): >"When the scanner receives an end-of-file indication from YY_INPUT, it >then checks the yywrap() function. If yywrap() returns false (zero), >then it is assumed that the function has gone ahead and set up yyin to >point to another input file, and scanning continues. If it returns >true (non-zero), then the scanner terminates, returning 0 to its >caller. Note that in either case, the start condition remains >unchanged; it does not revert to INITIAL." > >In short, you're supposed to return 1 in yywrap. Either that or set >the "%option noyywrap".
Thanks Piotr, I followed your advice and the loop terminated on EOF, but I got a syntax error after the loop. So I deleted the surplus and redundant call to yyparse() after the loop, and now I have the proof of concept of my dreams. Thanks so much! SteveT Steve Litt Autumn 2023 featured book: Rapid Learning for the 21st Century http://www.troubleshooters.com/rl21