Branch: Tag:

2001-02-25

2001-02-25 14:42:55 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Minor type stack usage cleanup.

Rev: src/language.yacc:1.229

110:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.228 2001/02/24 02:38:32 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.229 2001/02/25 14:42:55 grubba Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
1298:    }    function_type_list optional_dot_dot_dot ':'    { +  /* Add the many type if there is none. */    if ($4)    { -  if ($3) { -  push_type(T_MANY); -  type_stack_reverse(); -  } else { +  if (!$3) {    /* function_type_list ends with a comma, or is empty.    * FIXME: Should this be a syntax error or not?    */
1311:    yyerror("Missing type before ... .");    }    type_stack_reverse(); -  push_type(T_MANY); +  type_stack_mark();    push_type(T_MIXED);    }    }else{    type_stack_reverse(); -  push_type(T_MANY); +  type_stack_mark();    push_type(T_VOID);    } -  +  /* Rotate T_MANY into the proper position. */ +  push_type(T_MANY); +  type_stack_reverse();    type_stack_mark();    }    type7 ')'