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.415 2008/04/25 13:04:15 grubba Exp $ + || $Id: language.yacc,v 1.416 2008/04/26 19:04:26 grubba Exp $   */      %pure_parser      %token TOK_ARROW      /*    * Basic value pushing    */   %token TOK_CONSTANT TOK_FLOAT TOK_STRING
pike.git/src/language.yacc:3723:    if(Pike_compiler->last_identifier) free_string(Pike_compiler->last_identifier);    copy_shared_string(Pike_compiler->last_identifier, $3->u.sval.u.string);    free_node ($3);    }    | idents '.' bad_identifier {}    | idents '.' error {}    ;      inherit_specifier: TOK_IDENTIFIER TOK_COLON_COLON    { +  struct compilation *c = THIS_COMPILATION;    int e = -1;       inherit_state = Pike_compiler;       for (inherit_depth = 0;; inherit_depth++, inherit_state = inherit_state->previous) {    int inh = find_inherit(inherit_state->new_program, $1->u.sval.u.string);    if (inh) {    e = inh;    break;    } -  if (inherit_depth == compilation_depth) break; +  if (inherit_depth == c->compilation_depth) break;    if (!TEST_COMPAT (7, 2) &&    ID_FROM_INT (inherit_state->previous->new_program,    inherit_state->parent_identifier)->name ==    $1->u.sval.u.string) {    e = 0;    break;    }    }    if (e == -1) {    if (TEST_COMPAT (7, 2))
pike.git/src/language.yacc:3761:    else    my_yyerror("No inherit or surrounding class %S.",    $1->u.sval.u.string);    }    }    free_node($1);    $$ = e;    }    | TOK_GLOBAL TOK_COLON_COLON    { +  struct compilation *c = THIS_COMPILATION;    inherit_state = Pike_compiler; -  for (inherit_depth = 0; inherit_depth < compilation_depth; +  for (inherit_depth = 0; inherit_depth < c->compilation_depth;    inherit_depth++, inherit_state = inherit_state->previous) {}    $$ = 0;    }    | inherit_specifier TOK_IDENTIFIER TOK_COLON_COLON    {    if ($1 >= 0) {    int e = 0;   #if 0    /* FIXME: The inherit modifiers aren't kept. */    if (!(inherit_state->new_program->inherits[$1].flags & ID_PRIVATE)) {