diff options
author | Zefram <zefram@fysh.org> | 2010-10-14 17:02:36 +0100 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2010-10-21 05:53:50 -0700 |
commit | 9eb5c532bf567fdd066254fcaacf4a66722714c5 (patch) | |
tree | 518311ad05d028dab7c1ef9be5bddfb43083e951 /perly.y | |
parent | 1e2159890b8bf881fbc717f671f87ba2dec1da46 (diff) | |
download | perl-9eb5c532bf567fdd066254fcaacf4a66722714c5.tar.gz |
fix and test PL_expect in recdescent parsing
Set PL_expect at the start of parse_fullstmt() as well as at the start
of parse_stmtseq(). Test both.
Diffstat (limited to 'perly.y')
-rw-r--r-- | perly.y | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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; |