|Weird mood Bison+Flex email@example.com (Davide Rizzo) (2003-03-17)|
|From:||"Davide Rizzo" <firstname.lastname@example.org>|
|Date:||17 Mar 2003 00:09:53 -0500|
|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
#define YY_USER_INIT BEGIN(INITIAL)
What else should I do to be sure everything could work well?
Return to the
Search the comp.compilers archives again.