pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:179:   %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.158 1999/12/30 16:47:18 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.159 1999/12/31 01:53:57 mast 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:2190:    | idents '.' error {}    ;      low_idents: F_IDENTIFIER    {    int i;    struct efun *f;    if(last_identifier) free_string(last_identifier);    copy_shared_string(last_identifier, $1->u.sval.u.string);    -  if(($$=lexical_islocal(last_identifier))) +  if(last_identifier == this_program_string) { +  struct svalue s; +  s.type=T_PROGRAM; +  s.u.program=new_program; +  $$=mkconstantsvaluenode(&s); +  } +  else if(($$=lexical_islocal(last_identifier)))    {    /* done, nothing to do here */    }else if((i=isidentifier(last_identifier))>=0){    $$=mkidentifiernode(i);    }else if(!($$=find_module_identifier(last_identifier))){    if(!num_parse_error)    {    if(compiler_pass==2)    {    my_yyerror("'%s' undefined.", last_identifier->str);