pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:1:   /* -*- c -*-   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: language.yacc,v 1.440 2008/06/29 12:37:10 nilsson Exp $ + || $Id: language.yacc,v 1.441 2008/06/29 12:50:04 nilsson Exp $   */      %pure_parser      %token TOK_ARROW      /*    * Basic value pushing    */   %token TOK_CONSTANT TOK_FLOAT TOK_STRING
pike.git/src/language.yacc:3704:    {    int i;       if(Pike_compiler->last_identifier) free_string(Pike_compiler->last_identifier);    copy_shared_string(Pike_compiler->last_identifier, $3->u.sval.u.string);       if (((i = find_shared_string_identifier(Pike_compiler->last_identifier,    Pike_compiler->new_program)) >= 0) ||    ((i = really_low_find_shared_string_identifier(Pike_compiler->last_identifier,    Pike_compiler->new_program, -  SEE_STATIC| +  SEE_PROTECTED|    SEE_PRIVATE)) >= 0)) {    struct reference *ref = Pike_compiler->new_program->identifier_references + i;    if (!TEST_COMPAT (7, 2) &&    IDENTIFIER_IS_VARIABLE (    ID_FROM_PTR (Pike_compiler->new_program, ref)->identifier_flags)) {    /* Allowing local:: on variables would lead to pathological    * behavior: If a non-local variable in a class is referenced    * both with and without local::, both references would    * address the same variable in all cases except where an    * inheriting program overrides it (c.f. [bug 1252]).
pike.git/src/language.yacc:4010:    {    int id;       if(Pike_compiler->last_identifier) free_string(Pike_compiler->last_identifier);    copy_shared_string(Pike_compiler->last_identifier, $2->u.sval.u.string);       if ($1 > 0)    id = low_reference_inherited_identifier(inherit_state,    $1,    Pike_compiler->last_identifier, -  SEE_STATIC); +  SEE_PROTECTED);    else    id = really_low_find_shared_string_identifier(Pike_compiler->last_identifier,    inherit_state->new_program, -  SEE_STATIC|SEE_PRIVATE); +  SEE_PROTECTED|SEE_PRIVATE);       if (id != -1) {    if (inherit_depth > 0) {    $$ = mkexternalnode(inherit_state->new_program, id);    } else {    $$ = mkidentifiernode(id);    }    } else if (($$ = program_magic_identifier (inherit_state, inherit_depth, $1,    Pike_compiler->last_identifier, 1))) {    /* All done. */
pike.git/src/language.yacc:4058:    {    int e,i;       if(Pike_compiler->last_identifier) free_string(Pike_compiler->last_identifier);    copy_shared_string(Pike_compiler->last_identifier, $2->u.sval.u.string);       $$=0;    for(e=1;e<(int)Pike_compiler->new_program->num_inherits;e++)    {    if(Pike_compiler->new_program->inherits[e].inherit_level!=1) continue; -  i=low_reference_inherited_identifier(0,e,$2->u.sval.u.string,SEE_STATIC); +  i=low_reference_inherited_identifier(0,e,$2->u.sval.u.string,SEE_PROTECTED);    if(i==-1) continue;    if($$)    {    $$=mknode(F_ARG_LIST,$$,mkidentifiernode(i));    }else{    $$=mkidentifiernode(i);    }    }    if(!$$)    {