pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:174:   %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.115 1999/03/29 20:17:21 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.116 1999/04/07 23:10:07 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:617:    push_type(T_FUNCTION);       {    struct pike_string *s=compiler_pop_type();    $<n>$=mkstrnode(s);    free_string(s);    }       if(compiler_pass==1)    { -  define_function($4->u.sval.u.string, +  $<number>5=define_function($4->u.sval.u.string,    $<n>$->u.sval.u.string,    $1,    IDENTIFIER_PIKE_FUNCTION,    0);    }    }    block_or_semi    {    int e;    if($10)
pike.git/src/language.yacc:643:    !compiler_frame->variable[e].name->len)    {    my_yyerror("Missing name for argument %d.",e);    }    }       f=dooptcode($4->u.sval.u.string, $10, $<n>9->u.sval.u.string, $1);   #ifdef PIKE_DEBUG    if(recoveries && sp-evaluator_stack < recoveries->sp)    fatal("Stack error (underflow)\n"); +  +  if(compiler_pass == 1 && f!=$<number>5) +  fatal("define_function screwed up! %d != %d\n",f,$<number>5);   #endif    }    pop_compiler_frame();    free_node($4);    free_node($<n>9);    }    | modifiers type_or_error optional_stars bad_identifier    '(' arguments ')' block_or_semi    {    free_string(compiler_pop_type());