This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add link for the Coverity perl5 project.
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index 8050360..b3be67d 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -45,7 +45,7 @@
 
 %token <ival> GRAMPROG GRAMEXPR GRAMBLOCK GRAMBARESTMT GRAMFULLSTMT GRAMSTMTSEQ
 
-%token <ival> '{' '}' '[' ']' '-' '+' '$' '@' '%' '*' '&' ';' '=' '.'
+%token <ival> '{' '}' '[' ']' '-' '+' '@' '%' '&' '=' '.'
 
 %token <opval> WORD METHOD FUNCMETH THING PMFUNC PRIVATEREF QWLIST
 %token <opval> FUNC0OP FUNC0SUB UNIOPSUB LSTOPSUB
@@ -366,13 +366,7 @@ barestmt:  PLUGSTMT
                        }
        |       GIVEN '(' remember mexpr ')' mblock
                        {
-                         const PADOFFSET offset = pad_findmy_pvs("$_", 0);
-                         $$ = block_end($3,
-                                 newGIVENOP($4, op_scope($6),
-                                   offset == NOT_IN_PAD
-                                   || PAD_COMPNAME_FLAGS_isOUR(offset)
-                                     ? 0
-                                     : offset));
+                         $$ = block_end($3, newGIVENOP($4, op_scope($6), 0));
                          parser->copline = (line_t)$1;
                        }
        |       WHEN '(' remember mexpr ')' mblock
@@ -829,7 +823,7 @@ termunop : '-' term %prec UMINUS                       /* -$x */
        |       '!' term                               /* !$x */
                        { $$ = newUNOP(OP_NOT, 0, scalar($2)); }
        |       '~' term                               /* ~$x */
-                       { $$ = newUNOP(OP_COMPLEMENT, 0, scalar($2)); }
+                       { $$ = newUNOP($1, 0, scalar($2)); }
        |       term POSTINC                           /* $x++ */
                        { $$ = newUNOP(OP_POSTINC, 0,
                                        op_lvalue(scalar($1), OP_POSTINC)); }