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.383 2007/10/05 17:45:10 grubba Exp $ + || $Id: language.yacc,v 1.384 2007/10/06 09:59:05 grubba Exp $   */      %pure_parser      %token TOK_ARROW      /*    * Basic value pushing    */   %token TOK_CONSTANT TOK_FLOAT TOK_STRING
pike.git/src/language.yacc:2387:    push_finished_type(Pike_compiler->compiler_frame->current_type);    if ($3 && (Pike_compiler->compiler_pass == 2) && !TEST_COMPAT (0, 6)) {    yywarning("The *-syntax in types is obsolete. Use array instead.");    }    while($3--) push_type(T_ARRAY);    if ($4) {    push_type(T_ARRAY);    }    type=compiler_pop_type();    -  /* Add the identifier both globally. */ +  /* Add the identifier globally. +  * Note: Since these are the first identifiers (and references) +  * to be added to the program, they will be numbered in +  * sequence starting at 0 (zero). This means that the +  * counter num_create_args is sufficient extra information +  * to be able to keep track of them. +  */    ref_no = define_variable($5->u.sval.u.string, type,    Pike_compiler->current_modifiers); -  +  free_type(type);       if (Pike_compiler->num_create_args != ref_no) {    my_yyerror("Multiple definitions of create variable %S (%d != %d).",    $5->u.sval.u.string,    Pike_compiler->num_create_args, ref_no);    }    if ($4) {    /* Encode varargs marker as negative number of args. */    Pike_compiler->num_create_args = -(ref_no + 1);    } else {