Next: Why doesn't flex have non-greedy operators like perl does?, Previous: Is there a way to make flex treat NULL like a regular character?, Up: FAQ [Contents][Index]
You need to add a rule that matches the otherwise-unmatched text,
[[a bunch of rules here]]
. printf("bad input character '%s' at line %d\n", yytext, yylineno);
See %option default for more information.