[Commit] nickle ChangeLog,1.63,1.64 gram.y,1.133,1.134
Keith Packard
commit at keithp.com
Thu Jun 3 00:46:26 PDT 2004
- Previous message: [Commit] nickle ChangeLog,1.62,1.63 gram.y,1.132,1.133
- Next message: [Commit] nickle ChangeLog, 1.64, 1.65 abort.5c, 1.5, 1.6 arc4.5c,
1.5, 1.6 builtin-command.c, 1.12, 1.13 builtin-debug.c, 1.6,
1.7 builtin-environ.c, 1.5, 1.6 builtin-file.c, 1.16,
1.17 builtin-math.c, 1.10, 1.11 builtin-semaphore.c, 1.4,
1.5 builtin-sockets.c, 1.14, 1.15 builtin-string.c, 1.10,
1.11 builtin-thread.c, 1.4, 1.5 builtin-toplevel.c, 1.25,
1.26 builtin.5c, 1.7, 1.8 builtin.c, 1.18, 1.19 builtin.h, 1.8,
1.9 command.5c, 1.19, 1.20 compile.c, 1.154, 1.155 ctype.5c,
1.2, 1.3 debug.c, 1.33, 1.34 file.5c, 1.2, 1.3 file.c, 1.63,
1.64 func.c, 1.22, 1.23 gram.y, 1.134, 1.135 history.5c, 1.4,
1.5 lex.l, 1.74, 1.75 math.5c, 1.38, 1.39 mutex.5c, 1.8,
1.9 nickle.h, 1.117, 1.118 parse-args.5c, 1.1, 1.2 pretty.c,
1.69, 1.70 printf.5c, 1.8, 1.9 prng.5c, 1.10, 1.11 scanf.5c,
1.19, 1.20 socket.5c, 1.1, 1.2 string.5c, 1.8, 1.9 string.c,
1.17, 1.18 symbol.c, 1.19, 1.20 value.h, 1.104, 1.105
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Committed by: keithp
Update of /local/src/CVS/nickle
In directory home.keithp.com:/tmp/cvs-serv20001
Modified Files:
ChangeLog gram.y
Log Message:
2004-06-03 Keith Packard <keithp at keithp.com>
version 2.39
* gram.y:
Fix fix for crash with empty array/hash initializers
(really do need 'null' node in expr tree)
Index: ChangeLog
===================================================================
RCS file: /local/src/CVS/nickle/ChangeLog,v
retrieving revision 1.63
retrieving revision 1.64
diff -u -d -r1.63 -r1.64
--- a/ChangeLog 3 Jun 2004 07:29:17 -0000 1.63
+++ b/ChangeLog 3 Jun 2004 07:46:23 -0000 1.64
@@ -2,6 +2,12 @@
version 2.39
* gram.y:
+ Fix fix for crash with empty array/hash initializers
+ (really do need 'null' node in expr tree)
+
+2004-06-03 Keith Packard <keithp at keithp.com>
+
+ * gram.y:
Fix crash with empty array/hash initializers
2004-06-02 Keith Packard <keithp at keithp.com>
Index: gram.y
===================================================================
RCS file: /local/src/CVS/nickle/gram.y,v
retrieving revision 1.133
retrieving revision 1.134
diff -u -d -r1.133 -r1.134
--- a/gram.y 3 Jun 2004 07:29:17 -0000 1.133
+++ b/gram.y 3 Jun 2004 07:46:23 -0000 1.134
@@ -1338,17 +1338,21 @@
}
| OP OS dims CS CP namespace_start opt_arrayinit namespace_end
{
- $7->base.type = NewTypeArray (typePoly, $3, False);
- ParseCanonType ($7->base.type, False);
+ TypePtr t = NewTypeArray (typePoly, $3, False);
+ ParseCanonType (t, False);
$$ = NewExprTree (NEW, $7, 0);
- $$->base.type = $7->base.type;
+ if ($7)
+ $7->base.type = t;
+ $$->base.type = t;
}
| OP OS type CS CP namespace_start opt_hashinit namespace_end
{
- $7->base.type = NewTypeHash (typePoly, $3);
- ParseCanonType ($7->base.type, False);
+ TypePtr t = NewTypeHash (typePoly, $3);
+ ParseCanonType (t, False);
$$ = NewExprTree (NEW, $7, 0);
- $$->base.type = $7->base.type;
+ if ($7)
+ $7->base.type = t;
+ $$->base.type = t;
}
| type DOT NAME %prec UNIONCAST
{
@@ -1409,9 +1413,9 @@
*/
opt_arrayinit : arrayinit
| OC CC
- { $$ = NewExprTree (ARRAY, 0, 0); }
+ { $$ = 0; }
|
- { $$ = NewExprTree (ARRAY, 0, 0); }
+ { $$ = 0; }
;
arrayinit : OC arrayelts opt_comma opt_dotdotdot CC
{
@@ -1471,9 +1475,9 @@
*/
opt_hashinit : hashinit
| OC CC
- { $$ = NewExprTree (HASH, 0, 0); }
+ { $$ = 0; }
|
- { $$ = NewExprTree (HASH, 0, 0); }
+ { $$ = 0; }
;
hashinit : OC hashelts opt_comma CC
{
- Previous message: [Commit] nickle ChangeLog,1.62,1.63 gram.y,1.132,1.133
- Next message: [Commit] nickle ChangeLog, 1.64, 1.65 abort.5c, 1.5, 1.6 arc4.5c,
1.5, 1.6 builtin-command.c, 1.12, 1.13 builtin-debug.c, 1.6,
1.7 builtin-environ.c, 1.5, 1.6 builtin-file.c, 1.16,
1.17 builtin-math.c, 1.10, 1.11 builtin-semaphore.c, 1.4,
1.5 builtin-sockets.c, 1.14, 1.15 builtin-string.c, 1.10,
1.11 builtin-thread.c, 1.4, 1.5 builtin-toplevel.c, 1.25,
1.26 builtin.5c, 1.7, 1.8 builtin.c, 1.18, 1.19 builtin.h, 1.8,
1.9 command.5c, 1.19, 1.20 compile.c, 1.154, 1.155 ctype.5c,
1.2, 1.3 debug.c, 1.33, 1.34 file.5c, 1.2, 1.3 file.c, 1.63,
1.64 func.c, 1.22, 1.23 gram.y, 1.134, 1.135 history.5c, 1.4,
1.5 lex.l, 1.74, 1.75 math.5c, 1.38, 1.39 mutex.5c, 1.8,
1.9 nickle.h, 1.117, 1.118 parse-args.5c, 1.1, 1.2 pretty.c,
1.69, 1.70 printf.5c, 1.8, 1.9 prng.5c, 1.10, 1.11 scanf.5c,
1.19, 1.20 socket.5c, 1.1, 1.2 string.5c, 1.8, 1.9 string.c,
1.17, 1.18 symbol.c, 1.19, 1.20 value.h, 1.104, 1.105
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Commit
mailing list