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
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.