develooper Front page | perl.perl5.porters | Postings from November 2015

[perl #123737] S_no_op: Assertion `s >= oldbp' failed. (toke.c:536)

From:
Tony Cook via RT
Date:
November 25, 2015 05:22
Subject:
[perl #123737] S_no_op: Assertion `s >= oldbp' failed. (toke.c:536)
Message ID:
rt-4.0.18-1861-1448428967-1690.123737-15-0@perl.org
On Fri Apr 24 10:07:10 2015, alh wrote:
> The fix for this ticket fixed the first case, but are these individual
> fixes needed for each case, or is there some more global fix that covers
> them all? (I'm really not sure)

I think they'll need individual fixes, since they depend on the handler for each token advancing the buffer pointer to provide enough context.

> Also, here's another broken one:
> 
>   mhorsfall@tworivers:~$ perl -e '0@'
>   Array found where operator expected at -e line 1, at end of line
>       (Missing operator before ?)
>   syntax error at -e line 1, near "0@
>   "
>   Execution of -e aborted due to compilation errors.
> 
> Though that never appeared to report properly. Also the newline after the @
> is strange...

The attached improves the Missing operator line, it doesn't try to handle '0@$foo' but helps for '0@foo'.

The newline for the syntax error line isn't specific to @, it occurs for other similar synax errors too:

 $ ./perl -e '0$foo'
 Scalar found where operator expected at -e line 1, near "0$foo"
         (Missing operator before $foo?)
 syntax error at -e line 1, near "0$foo
 "
 Execution of -e aborted due to compilation errors.

Tony

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=123737



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About