summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y14
1 files changed, 13 insertions, 1 deletions
diff --git a/perly.y b/perly.y
index 3f6879e6ec..28e97f5c40 100644
--- a/perly.y
+++ b/perly.y
@@ -69,7 +69,7 @@
#endif
}
-%token <ival> GRAMPROG GRAMBLOCK GRAMFULLSTMT GRAMSTMTSEQ
+%token <ival> GRAMPROG GRAMBLOCK GRAMBARESTMT GRAMFULLSTMT GRAMSTMTSEQ
%token <i_tkval> '{' '}' '[' ']' '-' '+' '$' '@' '%' '*' '&' ';'
@@ -153,6 +153,18 @@ grammar : GRAMPROG prog
yyunlex();
parser->yychar = YYEOF;
}
+ | GRAMBARESTMT
+ {
+ parser->expect = XSTATE;
+ }
+ barestmt
+ {
+ PL_pad_reset_pending = TRUE;
+ PL_eval_root = $3;
+ $$ = 0;
+ yyunlex();
+ parser->yychar = YYEOF;
+ }
| GRAMFULLSTMT
{
parser->expect = XSTATE;