pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:149:   %left F_LSH F_RSH   %left '+' '-'   %left '*' '%' '/'   %right F_NOT '~'   %nonassoc F_INC F_DEC      %{   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.41 1997/04/23 20:11:49 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.42 1997/05/07 06:25:35 per 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"   #include "lex.h"   #include "program.h"   #include "pike_types.h"   #include "constants.h"   #include "pike_macros.h"   #include "error.h"   #include "docode.h" -  + #include "machine.h"      #define YYMAXDEPTH 600      #ifdef DEBUG   #define YYDEBUG 1   #endif      void free_all_local_names();   void add_local_name(struct pike_string *,struct pike_string *);   
pike.git/src/language.yacc:1267:   comma_expr_or_zero: /* empty */ { $$=mkintnode(0); }    | comma_expr    ;      comma_expr_or_maxint: /* empty */ { $$=mkintnode(0x7fffffff); }    | comma_expr    ;      gauge: F_GAUGE catch_arg    { + #ifdef HAVE_GETHRVTIME    $$=mkopernode("`-", -  +  mkopernode("`/", +  mkopernode("`-", mkefuncallnode("gethrvtime",0), +  mknode(F_ARG_LIST,$2, +  mkefuncallnode("gethrvtime",0))), +  mkintnode(1000)), 0); + #else +  $$=mkopernode("`-",    mkopernode("`-",    mknode(F_INDEX,mkefuncallnode("rusage",0),    mkintnode(GAUGE_RUSAGE_INDEX)),    mknode(F_ARG_LIST,$2,    mknode(F_INDEX,mkefuncallnode("rusage",0),    mkintnode(GAUGE_RUSAGE_INDEX)))),0); -  } ; + #endif +  };      typeof: F_TYPEOF '(' expr0 ')'    {    node *tmp;    tmp=mknode(F_ARG_LIST,$3,0);    $$=mkstrnode(describe_type($3->type));    free_node(tmp);    } ;      catch_arg: '(' comma_expr ')' { $$=$2; }