summaryrefslogtreecommitdiff
path: root/perly.y
diff options
context:
space:
mode:
Diffstat (limited to 'perly.y')
-rw-r--r--perly.y8
1 files changed, 6 insertions, 2 deletions
diff --git a/perly.y b/perly.y
index cc27ee295a..2b34f7d782 100644
--- a/perly.y
+++ b/perly.y
@@ -143,9 +143,13 @@
/* Top-level choice of what kind of thing yyparse was called to parse */
grammar : GRAMPROG prog
{ $$ = $2; }
- | GRAMFULLSTMT fullstmt
+ | GRAMFULLSTMT
{
- PL_eval_root = $2;
+ parser->expect = XSTATE;
+ }
+ fullstmt
+ {
+ PL_eval_root = $3;
$$ = 0;
yyunlex();
parser->yychar = YYEOF;