Skip Menu |

This queue is for tickets about the Erlang-Parser CPAN distribution.

Report information
The Basics
Id: 75318
Status: resolved
Priority: 0/
Queue: Erlang-Parser

People
Owner: anneli [...] cpan.org
Requestors: TEX [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.4
Fixed in: 0.5



Subject: Error Reporting delicate
The error reporting is suspectible to errors. Please consinder making it a little more robust wrt. to undefinedness.
Subject: errors.diff
--- Parser.pm.orig 2012-02-26 14:12:30.000000000 +0100 +++ Parser.pm 2012-02-26 14:28:33.000000000 +0100 @@ -19,11 +19,16 @@ } sub error { - say STDERR "Parse error!"; - print STDERR "Failed token was ", $_[0]->YYCurtok; - print STDERR ", value ", $_[0]->YYCurval; - print STDERR ", expected ", join(',', $_[0]->YYExpect); - print STDERR ".\n"; + print STDERR "Parse error!\n"; + if($_ && $_[0] && ref($_[0]) eq 'ARRAY') { + print STDERR "Failed token was ", $_[0]->YYCurtok; + print STDERR ", value ", $_[0]->YYCurval; + print STDERR ", expected ", join(',', $_[0]->YYExpect); + print STDERR ".\n"; + } else { + print STDERR "Empty object tree!\n"; + die("Can not continue w/o object tree!\n"); + } } =head1 NAME
Great! Thank you very much, Dominik. I've applied this patch here: https://github.com/anneli/Erlang-- Parser/commit/abb3a6b6b9a30cd81f5f8dc6cd7d7bd2b35ae751 I've also cleaned the code up a little, added some missing keywords (bnot, xor) and fixed up the parsing precedence (I think—any help on confirming would be greatly appreciated). These have all been released just now as 0.5, so it should be available soon. Thanks again! :) A
That URL didn't work so well in RT. Here it is shortened: http://git.io/EhEzCQ On 2012-02-26 17:05:21, ANNELI wrote: Show quoted text
> Great! Thank you very much, Dominik. I've applied this patch here: > > https://github.com/anneli/Erlang-- > Parser/commit/abb3a6b6b9a30cd81f5f8dc6cd7d7bd2b35ae751 > > I've also cleaned the code up a little, added some missing keywords > (bnot, xor) and fixed up the > parsing precedence (I think—any help on confirming would be greatly > appreciated). These have > all been released just now as 0.5, so it should be available soon. > > Thanks again! :) > > A
(and closed.))