Uli's Web Site |
|
blog |
Uli's 4:53 PM Law
When your Lex/YACC (aka FLex/BISON)-parser gives you several tokens (e.g. "15 + 4") for the text of one, you very likely assumed yytext was valid beyond the end of yylex() or yy_scan_string(). Inconveniently, it isn't. Use strdup() or some other convenient API call to make a copy of yytext to be able to keep it around. |
Created: 2005-08-14 @662 Last change: 2005-08-14 @667 | Home | Admin | Edit © Copyright 2003-2024 by M. Uli Kusterer, all rights reserved. |