pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:103:   %left TOK_LSH TOK_RSH   %left '+' '-'   %left '*' '%' '/'   %right TOK_NOT '~'   %nonassoc TOK_INC TOK_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.204 2000/07/13 22:32:15 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.205 2000/07/18 06:02:16 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:639:    /* FIXME: Lookup the type of any existing variant */    /* Or the types. */    fprintf(stderr, "Pass %d: Identifier %s:\n",    Pike_compiler->compiler_pass, $4->u.sval.u.string->str);       if (i >= 0) {    struct identifier *id = ID_FROM_INT(Pike_compiler->new_program, i);    if (id) {    struct pike_string *new_type;    fprintf(stderr, "Defined, type:\n"); + #ifdef PIKE_DEBUG    simple_describe_type(id->type); -  + #endif       new_type = or_pike_types(s, id->type, 1);    free_string(s);    s = new_type;       fprintf(stderr, "Resulting type:\n"); -  + #ifdef PIKE_DEBUG    simple_describe_type(s); -  + #endif    } else {    my_yyerror("Lost identifier %s (%d).",    $4->u.sval.u.string->str, i);    }    } else {    fprintf(stderr, "Not defined.\n");    }    fprintf(stderr, "New type:\n"); -  + #ifdef PIKE_DEBUG    simple_describe_type(s); -  + #endif    }    } else {    /* FIXME: Second pass reuses the type from the end of    * the first pass if this is a variant function.    */    if (i >= 0) {    if (Pike_compiler->new_program->identifier_references[i].id_flags &    ID_VARIANT) {    struct identifier *id = ID_FROM_INT(Pike_compiler->new_program, i);    fprintf(stderr, "Pass %d: Identifier %s:\n",    Pike_compiler->compiler_pass, $4->u.sval.u.string->str);       free_string(s);    copy_shared_string(s, id->type);       fprintf(stderr, "Resulting type:\n"); -  + #ifdef PIKE_DEBUG    simple_describe_type(s); -  + #endif    }    } else {    my_yyerror("Identifier %s lost after first pass.",    $4->u.sval.u.string->str);    }    }       $<n>$=mkstrnode(s);    free_string(s);    }