Is there a way to return a token to an input stream using Flex? I imagine some type function yyunlex().
yyunlex()
There is a macro REJECTthat will return the token into the stream and continue to comply with other rules, as if the first matching did not. If you just want to put some char back in the @Kizaru stream, the answer will suffice.
REJECT
Fragment example:
%% a | ab | abc | abcd ECHO; REJECT; .|\n printf("xx%c", *yytext); %%
You have several options.
, unput(ch), ch - . ch ( , ). , , .
unput(ch)
, yyless(0), . , , , - . n hwich , n .
yyless(0)
n
, /, lex . , bison yacc, yyparse().
yyparse()