Branch: Tag:

2000-03-30

2000-03-30 18:59:32 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Fixed obscure compiler bug (see InfoKOM 185482).

Rev: src/language.yacc:1.172

188:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.171 2000/03/30 08:43:07 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.172 2000/03/30 18:59:32 grubba Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
308:   %type <number> modifier   %type <number> modifier_list   %type <number> modifiers + %type <number> function_type_list + %type <number> function_type_list2   %type <number> optional_dot_dot_dot -  + %type <number> optional_comma   %type <number> optional_stars      %type <str> magic_identifiers
1236:    {    if ($4)    { +  if (!$3) { +  /* FIXME: Should this be a syntax error or not? */ +  push_type(T_MIXED); +  }    push_type(T_MANY);    type_stack_reverse();    }else{
1264:    }    ;    - function_type_list: /* Empty */ optional_comma -  | function_type_list2 optional_comma + function_type_list: /* Empty */ optional_comma { $$=0; } +  | function_type_list2 optional_comma { $$=!$2; }    ;    - function_type_list2: type7 + function_type_list2: type7 { $$=1; }    | function_type_list2 ','    {    type_stack_reverse();
2146:    | F_DIV_EQ { $$=F_DIV_EQ; }    ;    - optional_comma: | ',' ; + optional_comma: { $$=0; } | ',' { $$=1; };      expr_list: { $$=0; }    | expr_list2 optional_comma