Simple parser using Flex and C++
Overview
There is an issue (Bug) here in that yytext points at the beginning of the lexeme. But the lexeme is not null ('\0') terminated. You need to pass a length if you want to pass the current token into vec
   vec.push_back(yytext);

   // should be:
   vec.emplace_back(yytext, yytext + yylen);



You had a bug in your call to the underlying base class.
    FileLexer(std::istream&amp; in, std::ostream&amp; out) :
        yyFlexLexer{&amp;in, &amp;out},
        out{out}
    {}

Sorry I fixed it before any answers. But you need to pass the address of the streams to yyFlexLexer.

Normally I would return a value for each lexeme (and move any complex processing into methods of FileLexer. BUT this is such a simple class I don't see any issue with your current implementation of putting all the code in the lexer directly (though I would remove the return 1; from the end of line marker to make it consistent with field processing).

This seems to be correct.
std::copy(vec.begin(), vec.end(), std::experimental::make_ostream_joiner(out, &quot;,&quot;));
out &lt;&lt; '\n';

But it is not obvious how it achieves it. Would be nice to have a comment that points out that field 10/11 are not added to the end but rather to a point not at the end of the end of the vector.