From 5b6acd9b5aeed3816f847792c687f65b41bf42a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 30 Apr 1998 09:30:37 -0700
Subject: [PATCH] fixed some error productions so they will not coredump

Rev: src/language.yacc:1.95
---
 src/language.yacc | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/language.yacc b/src/language.yacc
index 0e7cda94d7..b350ce8679 100644
--- a/src/language.yacc
+++ b/src/language.yacc
@@ -177,7 +177,7 @@
 /* This is the grammar definition of Pike. */
 
 #include "global.h"
-RCSID("$Id: language.yacc,v 1.94 1998/04/30 06:32:36 hubbe Exp $");
+RCSID("$Id: language.yacc,v 1.95 1998/04/30 16:30:37 hubbe Exp $");
 #ifdef HAVE_MEMORY_H
 #include <memory.h>
 #endif
@@ -966,8 +966,8 @@ new_local_name: optional_stars F_IDENTIFIER
     $$=mknode(F_ASSIGN,mkintnode(0),mklocalnode(islocal($2->u.sval.u.string)));
     free_node($2);
   }
-  | optional_stars bad_identifier {}
-  | optional_stars F_IDENTIFIER '=' expr0
+  | optional_stars bad_identifier { $$=0; }
+  | optional_stars F_IDENTIFIER '=' expr0 
   {
     push_finished_type($<n>0->u.sval.u.string);
     while($1--) push_type(T_ARRAY);
@@ -978,11 +978,13 @@ new_local_name: optional_stars F_IDENTIFIER
   | optional_stars bad_identifier '=' expr0
   {
     free_node($4);
+    $$=0;
   }
   | optional_stars F_IDENTIFIER '=' error
   {
     free_node($2);
     /* No yyerok here since we aren't done yet. */
+    $$=0;
   }
   ;
 
-- 
GitLab