[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: std::string as YYSTYPE segfaults
From: |
Hans Aberg |
Subject: |
Re: std::string as YYSTYPE segfaults |
Date: |
Fri, 1 Mar 2002 10:38:59 +0100 |
At 08:45 +0100 2002/03/01, Magnus Ekhall wrote:
>I abandoned the C++-strings and typedef YYSTYPE as a const char* instead, and
>used strdup() in my Flex scanner.
>It works, but I do not know where exactly to release the memory allocated.
That's reason I use C++, because releases are kept track of via the language.
>It feels like I had a stack problem before, just as you said, since the parser
>freaked out "after a while", and the grammar works fine with the strdup()
>version. I'm not quite sure how to set the size of Bison's static stack?
See bison.simple: You #define YYINITDEPTH (originally set to 200). By
increasing this value, you should at least be able to check if your error
comes later on.
Hans Aberg