This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix up dtrace compile/link for Solaris
[perl5.git] / perly.y
diff --git a/perly.y b/perly.y
index 9f10b8b..200964d 100644 (file)
--- a/perly.y
+++ b/perly.y
@@ -31,7 +31,7 @@
 
 /*  Make the parser re-entrant. */
 
-%pure_parser
+%pure-parser
 
 %start grammar
 
@@ -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
@@ -69,7 +69,7 @@
 %type <opval> stmtseq fullstmt labfullstmt barestmt block mblock else
 %type <opval> expr term subscripted scalar ary hsh arylen star amper sideff
 %type <opval> sliceme kvslice gelem
-%type <opval> listexpr nexpr texpr iexpr mexpr mnexpr miexpr
+%type <opval> listexpr nexpr texpr iexpr mexpr mnexpr
 %type <opval> optlistexpr optexpr optrepl indirob listop method
 %type <opval> formname subname proto optsubbody cont my_scalar my_var
 %type <opval> refgen_topic formblock
@@ -358,21 +358,15 @@ barestmt: PLUGSTMT
                              newCONDOP(0, $4, op_scope($6), $7));
                          parser->copline = (line_t)$1;
                        }
-       |       UNLESS '(' remember miexpr ')' mblock else
+       |       UNLESS '(' remember mexpr ')' mblock else
                        {
                          $$ = block_end($3,
-                             newCONDOP(0, $4, op_scope($6), $7));
+                              newCONDOP(0, $4, $7, op_scope($6)));
                          parser->copline = (line_t)$1;
                        }
        |       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
@@ -587,10 +581,6 @@ mnexpr     :       nexpr
                        { $$ = $1; intro_my(); }
        ;
 
-miexpr :       iexpr
-                       { $$ = $1; intro_my(); }
-       ;
-
 formname:      WORD            { $$ = $1; }
        |       /* NULL */      { $$ = (OP*)NULL; }
        ;