Results 1 to 2 of 2
I am using a library in my Qt application which is built and generated by lex and yacc compiler. When I am calling first time the function it’s working fine, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-14-2012 #1
- Join Date
- Nov 2012
flex bison question
bool upgrade_model(char *model, string &newModel); //this function is exposed by the static library.Code:
string newmodel; bool upgraded = upgrade_model("/home/red/good.model",&newmodel); // it runs fine upgraded = upgrade_model("/home/red/bad.model",&newmodel); //it throws error upgraded = upgrade_model("/home/red/good.model",&newmodel); //it throws error
Last edited by appollosputnik; 11-14-2012 at 03:26 PM.
- 03-05-2013 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, in Chicago, or in a galaxy far, far away.
Since this is almost 4 months old, I hope you have sorted it out. If not, then I can only surmise that it is a bug - either in the code itself, or on the flex/bison rules that generate the state machine that is running in the library to process these files. If you can manually clear the error flag that may be at issue here in your code, then that may a work-around, otherwise you will have to dig deeper, such as building the module in debug mode and then running the application in the debugger.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!