pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:155:   %left F_LSH F_RSH   %left '+' '-'   %left '*' '%' '/'   %right F_NOT '~'   %nonassoc F_INC F_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.61 1998/02/27 08:39:19 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.62 1998/03/01 03:42:08 hubbe 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:602:    }       if(!$3)    {    struct pike_string *s;    MAKE_CONSTANT_SHARED_STRING(s,"");    $3=mkstrnode(s);    free_string(s);    }    -  if(islocal($3->u.sval.u.string) >= 0) +  if($3->u.sval.u.string->len && +  islocal($3->u.sval.u.string) >= 0)    my_yyerror("Variable '%s' appears twice in argument list.",    $3->u.sval.u.string->str);       add_local_name($3->u.sval.u.string, pop_type());    free_node($3);    }    ;      func_args: '(' arguments ')' { $$=$2; }    | '(' error ')' { $$=0; yyerrok; }