I am trying to figure out how I can display a message / prompt when using lex / yacc (flex / bison).
For example, the main thing looks like this:
int main(int argc, char *argv[]) { yyparse(); }
What a yacc call that calls yylex (). This gives an empty string waiting for STDIN. How can I display a message like ...
message $ _
instead
_
If the underscore represents the cursor position, waiting for input from STDIN ...
I forgot to mention, I would like the invitation to be printed multiple times ... therefore, before each input of the lex / yacc request from stdin ..
cola
source share