Weird mood Bison+Flex

"Davide Rizzo" <>
17 Mar 2003 00:09:53 -0500

          From comp.compilers

Related articles
Weird mood Bison+Flex (Davide Rizzo) (2003-03-17)
| List of all articles for this month |

From: "Davide Rizzo" <>
Newsgroups: comp.compilers
Date: 17 Mar 2003 00:09:53 -0500
Organization: TIN
Keywords: yacc, lex, Windows, question
Posted-Date: 17 Mar 2003 00:09:53 EST

I finally integrated my language in a Visual C++ project. My last problem is
that, while everything went right while working on a single dos executable
(representing the language), I got weird mood while using it under my app.
After parsing something, sometimes happen that new inputs are not
recognized, while if I close the app and start it again, the parsing finish
well. I think I forgot something, but I don't know what!
Before calling yyparse() i do the following:
yy_delete_buffer(YY_CURRENT_BUFFER); // delete previous buffer
// reset all data structures used in rule actions
my_buffer_state=yy_scan_string(input.c_str()); // load the input to

in Flex, I use the following to reset to initial start condition

What else should I do to be sure everything could work well?

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.