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.52 1998/01/19 18:38:45 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.53 1998/01/20 02:30:35 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:914:       if(new_program->flags | PROGRAM_PASS_1_DONE)    {    sprintf(buf,"__lambda_%ld",    (long)new_program->num_identifier_references);    name=make_shared_string(buf);       f=dooptcode(name,    mknode(F_ARG_LIST,$4,mknode(F_RETURN,mkintnode(0),0)),    type, -  0); +  ID_PRIVATE);    }    free_string(name);    free_string(type);    comp_stackp=$<number>2;    pop_compiler_frame();    $$=mkidentifiernode(f);    }    ;      failsafe_program: '{' program '}'    | error { yyerrok; }    ;    - class: modifiers F_CLASS F_IDENTIFIER + class: modifiers F_CLASS optional_identifier    { -  +  if(!$3) +  { +  char buffer[42]; +  sprintf(buffer,"__class_%ld",local_class_counter++); +  $3=make_shared_string(buffer); +  $1|=ID_PRIVATE; +  }    if(compiler_pass==1)    {    low_start_new_program(0, $3, $1);    }else{    int i;    struct program *p;    struct identifier *id;    i=isidentifier($3);    if(i<0)    {