Remove the error messages "Final @ should be \@ or @name"
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 9 May 2003 21:23:57 +0000 (21:23 +0000)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 9 May 2003 21:23:57 +0000 (21:23 +0000)
and "Final % should be \% or %name", that appear to be
only produced in addition to another syntax error, and therefore
misleading, if I understand correctly that kind of black magic.

p4raw-id: //depot/perl@19468

pod/perldiag.pod
toke.c

index f40b7a0..8a744b9 100644 (file)
@@ -1520,13 +1520,6 @@ a literal dollar sign, or was meant to introduce a variable name that
 happens to be missing.  So you have to put either the backslash or the
 name.
 
-=item Final @ should be \@ or @name
-
-(F) You must now decide whether the final @ in a string was meant to be
-a literal "at" sign, or was meant to introduce a variable name that
-happens to be missing.  So you have to put either the backslash or the
-name.
-
 =item flock() on closed filehandle %s
 
 (W closed) The filehandle you're attempting to flock() got itself closed
diff --git a/toke.c b/toke.c
index 850480c..4d694cd 100644 (file)
--- a/toke.c
+++ b/toke.c
@@ -2940,8 +2940,6 @@ Perl_yylex(pTHX)
        PL_tokenbuf[0] = '%';
        s = scan_ident(s, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, TRUE);
        if (!PL_tokenbuf[1]) {
-           if (s == PL_bufend)
-               yyerror("Final % should be \\% or %name");
            PREREF('%');
        }
        PL_pending_ident = '%';
@@ -3575,8 +3573,6 @@ Perl_yylex(pTHX)
        PL_tokenbuf[0] = '@';
        s = scan_ident(s, PL_bufend, PL_tokenbuf + 1, sizeof PL_tokenbuf - 1, FALSE);
        if (!PL_tokenbuf[1]) {
-           if (s == PL_bufend)
-               yyerror("Final @ should be \\@ or @name");
            PREREF('@');
        }
        if (PL_lex_state == LEX_NORMAL)