pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:102:   %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.185 2000/05/11 14:09:45 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.186 2000/05/17 19:30:59 grubba 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:2435:   #endif    };      typeof: TOK_TYPEOF '(' expr0 ')'    {    struct pike_string *s;    node *tmp;       /* FIXME: Why build the node at all? */    -  tmp=mknode(F_COMMA_EXPR,$3,0); +  tmp=mknode(F_COMMA_EXPR, $3, 0);    -  s=describe_type( tmp && CAR(tmp) && CAR(tmp)->type ? CAR(tmp)->type : mixed_type_string); -  $$=mkstrnode(s); -  free_string(s); +  s=(tmp && CAR(tmp) && CAR(tmp)->type ? CAR(tmp)->type : mixed_type_string); +  $$ = mktypenode(s);    free_node(tmp);    }    | TOK_TYPEOF '(' error ')' { $$=0; yyerrok; }    | TOK_TYPEOF '(' error '}' { $$=0; yyerror("Missing ')'."); }    | TOK_TYPEOF '(' error TOK_LEX_EOF    {    $$=0; yyerror("Missing ')'.");    yyerror("Unexpected end of file.");    }    | TOK_TYPEOF '(' error ';' { $$=0; yyerror("Missing ')'."); }