arun kv | 30 Apr 12:54
Favicon

memory errors ....

  
Hi All, 

I have implemented a parser using lex and yacc ,  my lex and yacc files are named parser.y and scanner.l 
(these files are compiled with flex++ and bison++  to make my parser compatible with C++) 
My parser is working fine but .... 
The issue is when I run my parser with purify (a memory detection tool ) .It gives out memory errors in the flex
and bison generated  source codes (parser.cpp , parser.h and scanner.h )

The purify errors for the parser are : 
IPR :Invalid pointer read , IPW :Invalid pointer write , BSR: Beyond stack read error 
Shown by these variables in parser.cpp 
yystate
yyn    
yyssp  
yyvsp  
yyerrstatus    
yycharl

For detailed purify log please see the attached file. 
What I want to know is that, Is there any way in which I can control these variables form my lex and yacc files. 
Or how else I can fix these memory errors shown by purify. 
Best Regards 
Arun 

Attachment (parser.log): application/octet-stream, 41 KiB
_______________________________________________
help-bison <at> gnu.org http://lists.gnu.org/mailman/listinfo/help-bison

Gmane