Skip Menu |
 

This queue is for tickets about the Parse-ABNF CPAN distribution.

Report information
The Basics
Id: 42698
Status: open
Priority: 0/
Queue: Parse-ABNF

People
Owner: Nobody in particular
Requestors: mschwern [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.05
Fixed in: (no value)



Subject: Fails messily if the grammar does not end in a newline
Download (untitled) / with headers
text/plain 961b
The attached grammar causes the error below when run through parse(). Note that it is missing a newline at the end of the file. If you add a newline it works fine. It would be nice if Parse::ABNF emitted an error or warning about the missing newline. Variable "$errortext" is not available at /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line 2906, <> line 61. Variable "$errorprefix" is not available at /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line 2906, <> line 61. Use of uninitialized value $errorprefix in formline at /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line 2850, <> line 61. Use of uninitialized value $errortext in formline at /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line 2850, <> line 61. Use of uninitialized value $errortext in formline at /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line 2852, <> line 61. :
Subject: tap.abnf
Download tap.abnf
application/octet-stream 2.5k

Message body not shown because it is not plain text.

Subject: Re: [rt.cpan.org #42698] Fails messily if the grammar does not end in a newline
Date: Fri, 23 Jan 2009 06:16:38 +0100
To: bug-Parse-ABNF [...] rt.cpan.org
From: Bjoern Hoehrmann <derhoermi [...] gmx.net>
Download (untitled) / with headers
text/plain 1.5k
* Michael G Schwern via RT wrote: Show quoted text
>The attached grammar causes the error below when run through parse(). >Note that it is missing a newline at the end of the file. If you add a >newline it works fine. It would be nice if Parse::ABNF emitted an error >or warning about the missing newline.
With Parse::RecDescent 1.96.0 I get ERROR (line 61): Invalid rule: Was expecting c nl These errors: Show quoted text
>Variable "$errortext" is not available at >/usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >2906, <> line 61. >Variable "$errorprefix" is not available at >/usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >2906, <> line 61. >Use of uninitialized value $errorprefix in formline at >/usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >2850, <> line 61. >Use of uninitialized value $errortext in formline at >/usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >2850, <> line 61. >Use of uninitialized value $errortext in formline at >/usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >2852, <> line 61.
Come from a bug in Parse::RecDescent. CPAN will tell you 1.94 is the latest version due to another "bug" in Parse::RecDescent. See * http://rt.cpan.org/Public/Bug/Display.html?id=36085 and * http://rt.cpan.org/Public/Bug/Display.html?id=32288 regards, -- Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de 25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
CC: mschwern [...] cpan.org
Subject: Re: [rt.cpan.org #42698] Fails messily if the grammar does not end in a newline
Date: Thu, 22 Jan 2009 22:35:57 -0800
To: bug-Parse-ABNF [...] rt.cpan.org
From: Michael G Schwern <schwern [...] pobox.com>
Download (untitled) / with headers
text/plain 1.6k
Bjoern Hoehrmann via RT wrote: Show quoted text
> <URL: http://rt.cpan.org/Ticket/Display.html?id=42698 > > > * Michael G Schwern via RT wrote:
>> The attached grammar causes the error below when run through parse(). >> Note that it is missing a newline at the end of the file. If you add a >> newline it works fine. It would be nice if Parse::ABNF emitted an error >> or warning about the missing newline.
> > With Parse::RecDescent 1.96.0 I get > > ERROR (line 61): Invalid rule: Was expecting c nl > > These errors: >
>> Variable "$errortext" is not available at >> /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >> 2906, <> line 61. >> Variable "$errorprefix" is not available at >> /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >> 2906, <> line 61. >> Use of uninitialized value $errorprefix in formline at >> /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >> 2850, <> line 61. >> Use of uninitialized value $errortext in formline at >> /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >> 2850, <> line 61. >> Use of uninitialized value $errortext in formline at >> /usr/local/perl/5.10.0/lib/site_perl/5.10.0/Parse/RecDescent.pm line >> 2852, <> line 61.
> > Come from a bug in Parse::RecDescent. CPAN will tell you 1.94 is > the latest version due to another "bug" in Parse::RecDescent. See > > * http://rt.cpan.org/Public/Bug/Display.html?id=36085 and > * http://rt.cpan.org/Public/Bug/Display.html?id=32288
Yep, that's exactly what's happening. :( -- E: "Would you want to maintain a 5000 line Perl program?" d: "Why would you write a 5000 line program?"


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.