Revision: 54879
          http://brlcad.svn.sourceforge.net/brlcad/?rev=54879&view=rev
Author:   brlcad
Date:     2013-03-26 15:15:17 +0000 (Tue, 26 Mar 2013)
Log Message:
-----------
looks like a stack size of 0 means grow dynamically on the heap instead of 
static allocation.  array is going to be faster, but it's more critical to not 
hit a compile-time limit.  by default, grow the dynamic allocation from 256 in 
powers of two.

Modified Paths:
--------------
    brlcad/trunk/src/other/step/src/express/expparse.y
    brlcad/trunk/src/other/step/src/express/generated/expparse.c

Modified: brlcad/trunk/src/other/step/src/express/expparse.y
===================================================================
--- brlcad/trunk/src/other/step/src/express/expparse.y  2013-03-26 15:01:46 UTC 
(rev 54878)
+++ brlcad/trunk/src/other/step/src/express/expparse.y  2013-03-26 15:15:17 UTC 
(rev 54879)
@@ -2466,7 +2466,7 @@
     fprintf(stderr, "Last token (type %d) had value %x\n", yymajor, 
yyminor.yy0.val);
 }
 
-%stack_size 200
+%stack_size 0
 
 %stack_overflow {
     fprintf(stderr, "Express parser experienced stack overflow.\n");

Modified: brlcad/trunk/src/other/step/src/express/generated/expparse.c
===================================================================
--- brlcad/trunk/src/other/step/src/express/generated/expparse.c        
2013-03-26 15:01:46 UTC (rev 54878)
+++ brlcad/trunk/src/other/step/src/express/generated/expparse.c        
2013-03-26 15:15:17 UTC (rev 54879)
@@ -291,7 +291,7 @@
   Statement yy522;
 } YYMINORTYPE;
 #ifndef YYSTACKDEPTH
-#define YYSTACKDEPTH 200
+#define YYSTACKDEPTH 0
 #endif
 #define ParseARG_SDECL  parse_data_t parseData ;
 #define ParseARG_PDECL , parse_data_t parseData 
@@ -1582,7 +1582,7 @@
   int newSize;
   yyStackEntry *pNew;
 
-  newSize = p->yystksz*2 + 100;
+  newSize = p->yystksz*2 + 256;
   pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
   if( pNew ){
     p->yystack = pNew;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Own the Future-Intel® Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to