Branch: Tag:

1997-02-07

1997-02-07 01:04:01 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

inherit on objects implemented (simply does object_program())

Rev: src/language.yacc:1.22

156:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.21 1997/01/30 03:51:33 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.22 1997/02/07 01:04:01 hubbe Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
366:    {    push_string(make_shared_string(""));    resolv_constant($1); +  if(sp[-1].type == T_OBJECT) +  { +  struct program *p=sp[-1].u.object->prog; +  if(!p) +  { +  pop_stack(); +  push_int(0); +  }else{ +  p->refs++; +  pop_stack(); +  push_program(p); +  } +  }    if(sp[-1].type != T_PROGRAM)    {    yyerror("Illegal program identifier");
1159:    pop_stack();    }else{    $$=0; -  if( get_master() ) +  if( get_master() && !num_parse_error)    {    reference_shared_string($1);    push_string($1);