pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:103:   %left TOK_LSH TOK_RSH   %left '+' '-'   %left '*' '%' '/'   %right TOK_NOT '~'   %nonassoc TOK_INC TOK_DEC      %{   /* 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      #include "interpret.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "las.h"   #include "interpret.h"
pike.git/src/language.yacc:1291:    }    ;      opt_function_type: '('    {    type_stack_mark();    type_stack_mark();    }    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?    */    if (Pike_compiler->compiler_pass == 1) {    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 ')'    {    type_stack_reverse();    type_stack_reverse();    }    | /* empty */    {    push_type(T_MIXED);