pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:149:   %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.10 1996/11/26 20:32:19 grubba Exp $"); + RCSID("$Id: language.yacc,v 1.11 1996/11/27 03:45:47 hubbe 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:419:    if(!is_const($3))    {    struct svalue tmp;    yyerror("Constant definition is not constant.");    tmp.type=T_INT;    tmp.u.integer=0;    add_constant($1,&tmp, current_modifiers);    } else {    tmp=eval_low($3);    if(tmp < 1) +  {    yyerror("Error in constant definition."); -  +  }else{    pop_n_elems(tmp-1);    add_constant($1,sp-1,current_modifiers); -  free_string($1); +     pop_stack();    } -  +  free_string($1);    } -  +  }    ;      constant_list: constant_name    | constant_list ',' constant_name    ;      constant: F_CONSTANT modifiers constant_list ';'    ;      block_or_semi: block