This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[Merge] Eliminate PL_lex_expect; fix one bug; other clean-up
authorFather Chrysostomos <sprout@cpan.org>
Mon, 25 Aug 2014 02:03:29 +0000 (19:03 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 25 Aug 2014 02:03:29 +0000 (19:03 -0700)
commitb2bea0a9cc3975a6d0df1ebfa82cd24df518b9b0
treeb7e05253be1facf943d58558d2426d6db007e25a
parent1c6aa017a409609fa72ff9fd264ab682537bf528
parent624fa8bd47bc7ddc629a5cfec82069ff6af2649a
[Merge] Eliminate PL_lex_expect; fix one bug; other clean-up

PL_expect (PL_parser->expect) is what the lexer uses to keep track of
what type of thing to expect next.  This (partly) determines whether
‘{’ begins a block, or an anonymous hash, or a subscript.

In numerous cases PL_expect was being set to the wrong value.  There
were extra statements to set it back to the right value.  There was
also a mechanism to save the value (force_next/PL_lex_expect) and
restore it later.

If we just set PL_expect to the correct values to begin with, we can
simplify things conceptually and reduce the amount of code.

I fixed bug #80368 in the process, since it got in the way.

I also fixed up some comments in toke.c and changed PL_parser to
parser in perly.y.