pike.git / src / language.yacc

version» Context lines:

pike.git/src/language.yacc:174:   %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.117 1999/05/26 07:10:01 hubbe Exp $"); + RCSID("$Id: language.yacc,v 1.118 1999/06/19 22:10:07 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:2088:    if(recoveries && sp-evaluator_stack < recoveries->sp)    fatal("Stack error (underflow)\n");   #endif       if (num_parse_error > 10) return;    num_parse_error++;    cumulative_parse_error++;       if ( get_master() )    { +  if (lex.current_file) {    ref_push_string(lex.current_file); -  +  } else { +  /* yyerror() can be called from define_function(), which +  * can be called by the C module initialization code. +  */ +  push_constant_text(""); +  }    push_int(lex.current_line);    push_text(str);    SAFE_APPLY_MASTER("compile_error",3);    pop_stack();    }else{ -  +  if (lex.current_file) {    (void)fprintf(stderr, "%s:%ld: %s\n",    lex.current_file->str,    (long)lex.current_line,    str); -  +  } else { +  (void)fprintf(stderr, "NULL:%ld: %s\n", +  (long)lex.current_line, +  str); +  }    fflush(stderr);    }   }      /* argument must be a shared string */   /* Note that this function eats a reference to 'type' */   void add_local_name(struct pike_string *str,    struct pike_string *type)   {    reference_shared_string(str);