[BACK]Return to error.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / yacc

Diff for /src/usr.bin/yacc/error.c between version 1.6 and 1.7

version 1.6, 2001/11/19 19:02:18 version 1.7, 2002/06/19 03:24:56
Line 54 
Line 54 
 fatal(msg)  fatal(msg)
 char *msg;  char *msg;
 {  {
     fprintf(stderr, "%s: f - %s\n", __progname, msg);      fprintf(stderr, "%s: %s\n", input_file_name, msg);
     done(2);      done(2);
 }  }
   
Line 62 
Line 62 
 void  void
 no_space()  no_space()
 {  {
     fprintf(stderr, "%s: f - out of space\n", __progname);      fprintf(stderr, "%s: yacc is out of space\n", input_file_name);
     done(2);      done(2);
 }  }
   
Line 71 
Line 71 
 open_error(filename)  open_error(filename)
 char *filename;  char *filename;
 {  {
     fprintf(stderr, "%s: f - cannot open \"%s\"\n", __progname, filename);      fprintf(stderr, "%s: cannot open source file\n", input_file_name);
     done(2);      done(2);
 }  }
   
Line 79 
Line 79 
 void  void
 unexpected_EOF()  unexpected_EOF()
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", unexpected end-of-file\n",      fprintf(stderr, "%s:%d: unexpected end-of-file\n",
             __progname, lineno, input_file_name);              input_file_name, lineno);
     done(1);      done(1);
 }  }
   
Line 118 
Line 118 
 char *st_line;  char *st_line;
 char *st_cptr;  char *st_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", syntax error\n",      fprintf(stderr, "%s:%d: syntax error\n",
             __progname, st_lineno, input_file_name);              input_file_name, st_lineno);
     print_pos(st_line, st_cptr);      print_pos(st_line, st_cptr);
     done(1);      done(1);
 }  }
Line 130 
Line 130 
 char *c_line;  char *c_line;
 char *c_cptr;  char *c_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", unmatched /*\n",      fprintf(stderr, "%s:%d: unmatched /*\n",
             __progname, c_lineno, input_file_name);              input_file_name, c_lineno);
     print_pos(c_line, c_cptr);      print_pos(c_line, c_cptr);
     done(1);      done(1);
 }  }
Line 142 
Line 142 
 char *s_line;  char *s_line;
 char *s_cptr;  char *s_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", unterminated string\n",      fprintf(stderr, "%s:%d:, unterminated string\n",
             __progname, s_lineno, input_file_name);              input_file_name, s_lineno);
     print_pos(s_line, s_cptr);      print_pos(s_line, s_cptr);
     done(1);      done(1);
 }  }
Line 154 
Line 154 
 char *t_line;  char *t_line;
 char *t_cptr;  char *t_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", unmatched %%{\n",      fprintf(stderr, "%s:%d: unmatched %%{\n",
             __progname, t_lineno, input_file_name);              input_file_name, t_lineno);
     print_pos(t_line, t_cptr);      print_pos(t_line, t_cptr);
     done(1);      done(1);
 }  }
Line 166 
Line 166 
 char *u_line;  char *u_line;
 char *u_cptr;  char *u_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", unterminated %%union \      fprintf(stderr, "%s:%d: unterminated %%union declaration\n",
 declaration\n", __progname, u_lineno, input_file_name);              input_file_name, u_lineno);
     print_pos(u_line, u_cptr);      print_pos(u_line, u_cptr);
     done(1);      done(1);
 }  }
Line 176 
Line 176 
 over_unionized(u_cptr)  over_unionized(u_cptr)
 char *u_cptr;  char *u_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", too many %%union \      fprintf(stderr, "%s:%d: too many %%union declarations\n",
 declarations\n", __progname, lineno, input_file_name);              input_file_name, lineno);
     print_pos(line, u_cptr);      print_pos(line, u_cptr);
     done(1);      done(1);
 }  }
Line 188 
Line 188 
 char *t_line;  char *t_line;
 char *t_cptr;  char *t_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal tag\n",      fprintf(stderr, "%s:%d: illegal tag\n",
             __progname, t_lineno, input_file_name);              input_file_name, t_lineno);
     print_pos(t_line, t_cptr);      print_pos(t_line, t_cptr);
     done(1);      done(1);
 }  }
Line 199 
Line 199 
 illegal_character(c_cptr)  illegal_character(c_cptr)
 char *c_cptr;  char *c_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal character\n",      fprintf(stderr, "%s:%d: illegal character\n",
             __progname, lineno, input_file_name);              input_file_name, lineno);
     print_pos(line, c_cptr);      print_pos(line, c_cptr);
     done(1);      done(1);
 }  }
Line 210 
Line 210 
 used_reserved(s)  used_reserved(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal use of reserved symbol \      fprintf(stderr, "%s:%d: illegal use of reserved symbol %s\n",
 %s\n", __progname, lineno, input_file_name, s);              input_file_name, lineno, s);
     done(1);      done(1);
 }  }
   
Line 219 
Line 219 
 tokenized_start(s)  tokenized_start(s)
 char *s;  char *s;
 {  {
      fprintf(stderr, "%s: e - line %d of \"%s\", the start symbol %s cannot be \       fprintf(stderr, "%s:%d: the start symbol %s cannot be declared to be a token\n",
 declared to be a token\n", __progname, lineno, input_file_name, s);              input_file_name, lineno, s);
      done(1);       done(1);
 }  }
   
Line 228 
Line 228 
 retyped_warning(s)  retyped_warning(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: w - line %d of \"%s\", the type of %s has been \      fprintf(stderr, "%s:%d: the type of %s has been redeclared\n",
 redeclared\n", __progname, lineno, input_file_name, s);              input_file_name, lineno, s);
 }  }
   
 void  void
 reprec_warning(s)  reprec_warning(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: w - line %d of \"%s\", the precedence of %s has been \      fprintf(stderr, "%s:%d: the precedence of %s has been redeclared\n",
 redeclared\n", __progname, lineno, input_file_name, s);              input_file_name, lineno, s);
 }  }
   
 void  void
 revalued_warning(s)  revalued_warning(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: w - line %d of \"%s\", the value of %s has been \      fprintf(stderr, "%s:%d: the value of %s has been redeclared\n",
 redeclared\n", __progname, lineno, input_file_name, s);              input_file_name, lineno, s);
 }  }
   
 void  void
 terminal_start(s)  terminal_start(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", the start symbol %s is a \      fprintf(stderr, "%s:%d: the start symbol %s is a token\n",
 token\n", __progname, lineno, input_file_name, s);              input_file_name, lineno, s);
     done(1);      done(1);
 }  }
   
 void  void
 restarted_warning()  restarted_warning()
 {  {
     fprintf(stderr, "%s: w - line %d of \"%s\", the start symbol has been \      fprintf(stderr, "%s:%d: the start symbol has been redeclared\n",
 redeclared\n", __progname, lineno, input_file_name);               input_file_name, lineno);
 }  }
   
 void  void
 no_grammar()  no_grammar()
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", no grammar has been \      fprintf(stderr, "%s:%d: no grammar has been specified\n",
 specified\n", __progname, lineno, input_file_name);              input_file_name, lineno);
     done(1);      done(1);
 }  }
   
Line 276 
Line 276 
 terminal_lhs(s_lineno)  terminal_lhs(s_lineno)
 int s_lineno;  int s_lineno;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", a token appears on the lhs \      fprintf(stderr, "%s:%d: a token appears on the lhs of a production\n",
 of a production\n", __progname, s_lineno, input_file_name);              input_file_name, s_lineno);
     done(1);      done(1);
 }  }
   
 void  void
 prec_redeclared()  prec_redeclared()
 {  {
     fprintf(stderr, "%s: w - line %d of  \"%s\", conflicting %%prec \      fprintf(stderr, "%s:%d: conflicting %%prec specifiers\n",
 specifiers\n", __progname, lineno, input_file_name);              input_file_name, lineno);
 }  }
   
 void  void
Line 294 
Line 294 
 char *a_line;  char *a_line;
 char *a_cptr;  char *a_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", unterminated action\n",      fprintf(stderr, "%s:%d: unterminated action\n",
             __progname, a_lineno, input_file_name);              input_file_name, a_lineno);
     print_pos(a_line, a_cptr);      print_pos(a_line, a_cptr);
     done(1);      done(1);
 }  }
Line 305 
Line 305 
 int a_lineno;  int a_lineno;
 int i;  int i;
 {  {
     fprintf(stderr, "%s: w - line %d of \"%s\", $%d references beyond the \      fprintf(stderr, "%s:%d: $%d references beyond the end of the current rule\n",
 end of the current rule\n", __progname, a_lineno, input_file_name, i);              input_file_name, a_lineno, i);
 }  }
   
 void  void
Line 315 
Line 315 
 char *a_line;  char *a_line;
 char *a_cptr;  char *a_cptr;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", illegal $-name\n",      fprintf(stderr, "%s:%d: illegal $-name\n",
             __progname, a_lineno, input_file_name);              input_file_name, a_lineno);
     print_pos(a_line, a_cptr);      print_pos(a_line, a_cptr);
     done(1);      done(1);
 }  }
Line 325 
Line 325 
 void  void
 untyped_lhs()  untyped_lhs()
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", $$ is untyped\n",      fprintf(stderr, "%s:%d: $$ is untyped\n",
             __progname, lineno, input_file_name);              input_file_name, lineno);
     done(1);      done(1);
 }  }
   
Line 335 
Line 335 
 int i;  int i;
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", $%d (%s) is untyped\n",      fprintf(stderr, "%s:%d: $%d (%s) is untyped\n",
             __progname, lineno, input_file_name, i, s);              input_file_name, lineno, i, s);
     done(1);      done(1);
 }  }
   
Line 344 
Line 344 
 unknown_rhs(i)  unknown_rhs(i)
 int i;  int i;
 {  {
     fprintf(stderr, "%s: e - line %d of \"%s\", $%d is untyped\n",      fprintf(stderr, "%s:%d: $%d is untyped\n",
             __progname, lineno, input_file_name, i);              input_file_name, lineno, i);
     done(1);      done(1);
 }  }
   
 void  void
 default_action_warning()  default_action_warning()
 {  {
     fprintf(stderr, "%s: w - line %d of \"%s\", the default action assigns an \      fprintf(stderr, "%s:%d: the default action assigns an undefined value to $$\n",
 undefined value to $$\n", __progname, lineno, input_file_name);              input_file_name, lineno);
 }  }
   
 void  void
 undefined_goal(s)  undefined_goal(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: e - the start symbol %s is undefined\n", __progname, s);      fprintf(stderr, "%s: the start symbol %s is undefined\n", input_file_name, s);
     done(1);      done(1);
 }  }
   
Line 368 
Line 368 
 undefined_symbol_warning(s)  undefined_symbol_warning(s)
 char *s;  char *s;
 {  {
     fprintf(stderr, "%s: w - the symbol %s is undefined\n", __progname, s);      fprintf(stderr, "%s: the symbol %s is undefined\n", input_file_name, s);
 }  }

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7