unput fails for the first character in the body that is being scanned
and yyless is more efficient than unput, too.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
%option stack noyy_top_state
%option warn
-/* Do not let unput() trash yytext */
-%array
-
/* %option verbose */
%option debug
return T_EOL;
}
<READLINES>. {
- unput(*yytext);
+ yyless(0);
if (!readline_indent) {
readline_indent = current_indent;
<INDENT>\n { current_indent = 0; }
<INDENT>. {
// Put the read character back for the next round
- unput(*yytext);
+ yyless(0);
// --> - More indentation?
if (current_indent > indent_level) {