[Commit] nickle ChangeLog,1.62,1.63 gram.y,1.132,1.133

Keith Packard commit at keithp.com
Thu Jun 3 00:29:20 PDT 2004


Committed by: keithp

Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv17565

Modified Files:
	ChangeLog gram.y 
Log Message:
2004-06-03  Keith Packard  <keithp at keithp.com>
version 2.39

	* gram.y:
	Fix crash with empty array/hash initializers


Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- a/ChangeLog	3 Jun 2004 06:55:23 -0000	1.62
+++ b/ChangeLog	3 Jun 2004 07:29:17 -0000	1.63
@@ -1,7 +1,12 @@
-2004-06-02  Keith Packard  <keithp at keithp.com>
+2004-06-03  Keith Packard  <keithp at keithp.com>
 version 2.39
 
 	* gram.y:
+	Fix crash with empty array/hash initializers
+
+2004-06-02  Keith Packard  <keithp at keithp.com>
+
+	* gram.y:
 	* lex.l:
 	Eliminate 'primary' non-terminal.
 	Add ENDFILE token to ensure files end at top level.

Index: gram.y
===================================================================
RCS file: /local/src/CVS/nickle/gram.y,v
retrieving revision 1.132
retrieving revision 1.133
diff -u -d -r1.132 -r1.133
--- a/gram.y	3 Jun 2004 06:55:24 -0000	1.132
+++ b/gram.y	3 Jun 2004 07:29:17 -0000	1.133
@@ -1409,9 +1409,9 @@
  */
 opt_arrayinit	: arrayinit
 		| OC CC
-		    { $$ = 0; }
+		    { $$ = NewExprTree (ARRAY, 0, 0); }
 		|
-		    { $$ = 0; }
+		    { $$ = NewExprTree (ARRAY, 0, 0); }
 		;
 arrayinit    	: OC arrayelts opt_comma opt_dotdotdot CC
 		    { 
@@ -1471,9 +1471,9 @@
  */
 opt_hashinit	: hashinit
 		| OC CC
-		    { $$ = 0; }
+		    { $$ = NewExprTree (HASH, 0, 0); }
 		|
-		    { $$ = 0; }
+		    { $$ = NewExprTree (HASH, 0, 0); }
 		;
 hashinit	: OC hashelts opt_comma CC
 		    {




More information about the Commit mailing list