summaryrefslogtreecommitdiff
path: root/cpp/include/Slice/Parser.h
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2001-09-08 06:58:59 +0000
committerMarc Laukien <marc@zeroc.com>2001-09-08 06:58:59 +0000
commit31799abcd4ac79483b88bb721fd2ef5da9cd41fb (patch)
treea3af126967efa71bb6c6a297c36cd7aad2918f82 /cpp/include/Slice/Parser.h
parentworkaround for nasty bison problem (diff)
downloadice-31799abcd4ac79483b88bb721fd2ef5da9cd41fb.tar.bz2
ice-31799abcd4ac79483b88bb721fd2ef5da9cd41fb.tar.xz
ice-31799abcd4ac79483b88bb721fd2ef5da9cd41fb.zip
workaround for nasty bison problem
Diffstat (limited to 'cpp/include/Slice/Parser.h')
-rw-r--r--cpp/include/Slice/Parser.h13
1 files changed, 7 insertions, 6 deletions
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h
index 0513896be2d..433a32c4ff2 100644
--- a/cpp/include/Slice/Parser.h
+++ b/cpp/include/Slice/Parser.h
@@ -125,13 +125,14 @@ YY_DECL;
int yyparse();
//
-// I must set the initial bison stack depth to the maximum stack
-// depth, because the bison stack extension routines use simple
-// malloc/alloc, which doesn't work for C++ smart pointers with
-// constructors and destructors
+// I must set the initial stack depth to the maximum stack depth to
+// disable bison stack resizing. The bison stack resizing routines use
+// simple malloc/alloc/memcpy calls, which do not work for the
+// YYSTYPE, since YYSTYPE is a C++ smart pointer, with a default
+// constructor and a destructor.
//
-#define YYMAXDEPTH 20000 // 20000 should suffice. Default is 10000 for maximum
-#define YYINITDEPTH YYMAXDEPTH // initial depth == max depth, as described above
+#define YYMAXDEPTH 20000 // 20000 should suffice. Bison default is 10000 as maximum.
+#define YYINITDEPTH YYMAXDEPTH // Initial depth is set to max depth, for the reasons described above.
namespace Slice
{