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.310 2002/12/10 18:53:15 mast Exp $ + || $Id: language.yacc,v 1.311 2003/01/13 04:01:36 mast Exp $   */      %pure_parser      %token TOK_ARROW      /*    * Basic value pushing    */   %token TOK_CONSTANT TOK_FLOAT TOK_STRING
pike.git/src/language.yacc:106:   %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.310 2002/12/10 18:53:15 mast Exp $"); + RCSID("$Id: language.yacc,v 1.311 2003/01/13 04:01:36 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:3513:    | TOK_LEX_EOF { yyerror("Unexpected end of file."); $$=0; }    ;      comma_expr_or_maxint: /* empty */ { $$=mkintnode(0x7fffffff); }    | comma_expr    | TOK_LEX_EOF { yyerror("Unexpected end of file."); $$=mkintnode(0x7fffffff); }    ;      gauge: TOK_GAUGE catch_arg    { - #ifdef HAVE_GETHRVTIME +     $$=mkefuncallnode("abs",    mkopernode("`/",    mkopernode("`-", mkefuncallnode("gethrvtime",0),    mknode(F_COMMA_EXPR,    mknode(F_POP_VALUE, $2, NULL),    mkefuncallnode("gethrvtime",0))),    mkfloatnode((FLOAT_TYPE)1000000.0))); - #else -  $$=mkefuncallnode("abs", -  mkopernode("`/", -  mkopernode("`-", -  mknode(F_INDEX,mkefuncallnode("rusage",0), -  mkintnode(GAUGE_RUSAGE_INDEX)), -  mknode(F_COMMA_EXPR, mknode(F_POP_VALUE, $2, NULL), -  mknode(F_INDEX,mkefuncallnode("rusage",0), -  mkintnode(GAUGE_RUSAGE_INDEX)))), -  mkfloatnode((FLOAT_TYPE)1000.0))); - #endif +     };      typeof: TOK_TYPEOF '(' expr0 ')'    {    struct pike_type *t;    node *tmp;       /* FIXME: Why build the node at all? */    /* Because the optimizer cannot optimize the root node of the    * tree properly -Hubbe