/* Make the parser re-entrant. */
-%pure_parser
+%pure-parser
%start grammar
%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
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
{ $$ = $1; intro_my(); }
;
-miexpr : iexpr
- { $$ = $1; intro_my(); }
- ;
-
formname: WORD { $$ = $1; }
| /* NULL */ { $$ = (OP*)NULL; }
;
| myattrterm %prec UNIOP
{ $$ = $1; }
| LOCAL term %prec UNIOP
- { $$ = localize($2,$1); }
+ { $$ = localize($2,0); }
| '(' expr ')'
{ $$ = sawparens($2); }
| QWLIST
myattrterm: MY myterm myattrlist
{ $$ = my_attrs($2,$3); }
| MY myterm
- { $$ = localize($2,$1); }
+ { $$ = localize($2,1); }
;
/* Things that can be "my"'d */