Broken error recovery in parser.
Imported from http://bugzilla.roxen.com/bugzilla/show_bug.cgi?id=7616
Reported by @grubba
From [LysLysKOM 21578942]:
21578942 idag 01:55 /28 rader/ Chris Angelico <rosuav@gmail.com>
Sänt av: SRS0+PiTo=NE=lists.lysator.liu.se=pike-devel-bounces@lysator.liu.se
Importerad: idag 01:55 av Brevbäraren
Extern mottagare: pike-devel@lists.lysator.liu.se <pike-devel@lists.lysator.liu.se>
Mottagare: Pike (-) developers forum <19557>
Ärende: Internal compiler error (push_compiler_frame0)
------------------------------------------------------------
The following code triggers an "internal error" (seems to be from
language.yacc:699).
function frame0(function x)
{
return lambda()
{
if (string bad=x() //Missing close parenthesis
{
}
};
}
$ pike frame0.pike
frame0.pike:6:Internal compiler error (push_compiler_frame0).
frame0.pike:8:Missing ')'.
frame0.pike:10:Missing ';'.
frame0.pike:10:Unexpected end of file.
frame0.pike:10:Missing '}'.
frame0.pike:10:Opening '{' was here.
frame0.pike:10:Unexpected end of file.
Pike: Failed to compile script.
The code is in error (there should be another close parenthesis on line 5), but the actual error is masked. Is this worth looking into?
ChrisA
(21578942) /Chris Angelico rosuav@gmail.com/------