Branch: Tag:

2003-02-12

2003-02-12 06:03:49 by Martin Nilsson <mani@lysator.liu.se>

Avoid confusion with error messages like "Undefined identifier error."

Rev: src/language.yacc:1.317

2:   || 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.316 2003/02/08 16:58:44 mast Exp $ + || $Id: language.yacc,v 1.317 2003/02/12 06:03:49 nilsson Exp $   */      %pure_parser
113:   /* This is the grammar definition of Pike. */      #include "global.h" - RCSID("$Id: language.yacc,v 1.316 2003/02/08 16:58:44 mast Exp $"); + RCSID("$Id: language.yacc,v 1.317 2003/02/12 06:03:49 nilsson Exp $");   #ifdef HAVE_MEMORY_H   #include <memory.h>   #endif
3364:    {    if(Pike_compiler->compiler_pass==2)    { -  my_yyerror("Undefined identifier %s.", Pike_compiler->last_identifier->str); +  my_yyerror("Undefined identifier \"%s\".", Pike_compiler->last_identifier->str);    $$=0;    }else{    $$=mknode(F_UNDEFINED,0,0);
3425:    else {    if (Pike_compiler->compiler_pass == 2) {    if (inherit_state->new_program->inherits[$1].name) { -  my_yyerror("Undefined identifier %s::%s.", +  my_yyerror("Undefined identifier \"%s::%s\".",    inherit_state->new_program->inherits[$1].name->str,    Pike_compiler->last_identifier->str);    } else { -  my_yyerror("Undefined identifier %s.", Pike_compiler->last_identifier->str); +  my_yyerror("Undefined identifier \"%s\".", Pike_compiler->last_identifier->str);    }    $$=0;    }
3471:    {    if (Pike_compiler->compiler_pass == 2) {    if (TEST_COMPAT(7,2)) { -  yywarning("Undefined identifier ::%s.", $2->u.sval.u.string->str); +  yywarning("Undefined identifier \"::%s.\"", +  $2->u.sval.u.string->str);    } else { -  my_yyerror("Undefined identifier ::%s.", $2->u.sval.u.string->str); +  my_yyerror("Undefined identifier \"::%s\".", +  $2->u.sval.u.string->str);    }    }    $$=mkintnode(0);