From 4943aa758b52d09f09f255941be60ba246e64385 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net>
Date: Thu, 9 Apr 1998 13:37:20 -0700
Subject: [PATCH] bugfix

Rev: src/language.yacc:1.70
---
 src/language.yacc | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

diff --git a/src/language.yacc b/src/language.yacc
index 6bf4228ba5..fe7f7f4fb3 100644
--- a/src/language.yacc
+++ b/src/language.yacc
@@ -169,7 +169,7 @@
 /* This is the grammar definition of Pike. */
 
 #include "global.h"
-RCSID("$Id: language.yacc,v 1.69 1998/04/06 04:06:41 hubbe Exp $");
+RCSID("$Id: language.yacc,v 1.70 1998/04/09 20:37:20 hubbe Exp $");
 #ifdef HAVE_MEMORY_H
 #include <memory.h>
 #endif
@@ -818,7 +818,7 @@ new_name: optional_stars F_IDENTIFIER
 
 new_local_name: optional_stars F_IDENTIFIER
   {
-    push_finished_type(compiler_frame->current_type);
+    push_finished_type($<n>0->u.sval.u.string);
     while($1--) push_type(T_ARRAY);
     add_local_name($2->u.sval.u.string, pop_type());
     $$=mknode(F_ASSIGN,mkintnode(0), mklocalnode(islocal($2->u.sval.u.string)));
@@ -826,7 +826,7 @@ new_local_name: optional_stars F_IDENTIFIER
   }
   | optional_stars F_IDENTIFIER '=' expr0
   {
-    push_finished_type(compiler_frame->current_type);
+    push_finished_type($<n>0->u.sval.u.string);
     while($1--) push_type(T_ARRAY);
     add_local_name($2->u.sval.u.string, pop_type());
     $$=mknode(F_ASSIGN,$4,mklocalnode(islocal($2->u.sval.u.string)));
@@ -852,7 +852,7 @@ failsafe_block: block
   
 
 local_name_list: new_local_name
-  | local_name_list ',' new_local_name { $$=mknode(F_ARG_LIST,$1,$3); }
+  | local_name_list ',' { $<n>$=$<n>0; } new_local_name { $$=mknode(F_ARG_LIST,$1,$4); }
   ;
 
 statements: { $$=0; }
@@ -1135,12 +1135,7 @@ optional_comma_expr: { $$=0; }
   ;
 
 comma_expr: comma_expr2
-  | type2
-  {
-    if(compiler_frame->current_type)
-      free_string(compiler_frame->current_type);
-    compiler_frame->current_type=pop_type();
-  } local_name_list { $$=$3; }
+  | simple_type local_name_list { $$=$2; free_node($1); }
   ;
           
 
-- 
GitLab