Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^3: How to know where I am going wrong in writing the grammar

by ikegami (Pope)
on Apr 01, 2009 at 16:05 UTC ( #754753=note: print w/replies, xml ) Need Help??


in reply to Re^2: How to know where I am going wrong in writing the grammar
in thread How to know where I am going wrong in writing the grammar

  • Debian, 5.8.8, P::RD 1.94:

    Warning (line 27): Found an error marker (<error>) after an uncond +itional <error> (Hint: An unconditional <error> always causes the prod +uction containing it to immediately fail. An error mar +ker that follows an <error> will never be reached. Did y +ou mean to use <error?> instead?) ERROR (line 1): Invalid startOfRecord: Was expecting RECORDSTAR +T
  • WinXP, Active Perl 5.10.0 build 5001, P::RD 1.94: (repeated 3 times with different line numbers)

    Variable "$errortext" is not available at c:/progs/perl5100/site/lib/P +arse/RecDescent.pm line 2917. Variable "$errorprefix" is not available at c:/progs/perl5100/site/lib +/Parse/RecDescent.pm line 2917. Use of uninitialized value $errorprefix in formline at c:/progs/perl51 +00/site/lib/Parse/RecDescent.pm line 2850. Use of uninitialized value $errortext in formline at c:/progs/perl5100 +/site/lib/Parse/RecDescent.pm line 2850. Use of uninitialized value $errortext in formline at c:/progs/perl5100 +/site/lib/Parse/RecDescent.pm line 2852. :

    Repeated twice with different line numbers.

  • WinXP, Active Perl 5.10.0 build 5004, P::RD 1.94:

    same.

  • WinXP, Active Perl 5.10.0 build 5004, with P::RD 1.94 installed from CPAN instead of PPM:

    same.

  • WinXP, Active Perl 5.8.8, P::RD 1.94:

    Warning (line 27): Found an error marker (<error>) after an uncond +itional <error> (Hint: An unconditional <error> always causes the prod +uction containing it to immediately fail. An error mar +ker that follows an <error> will never be reached. Did y +ou mean to use <error?> instead?) ERROR (line 1): Invalid startOfRecord: Was expecting RECORDSTAR +T

Looks like an incompatibility with 5.10.0.

I guess I'll have to look at the actual code, but it'll have to wait.

Update: I've never seen that error message before, so here's what diagnostics has to say about it:

(W closure) During compilation, an inner named subroutine or eval +is attempting to capture an outer lexical that is not currently avail +able. This can happen for one of two reasons. First, the outer lexical m +ay be declared in an outer anonymous subroutine that has not yet been cr +eated. (Remember that named subs are created at compile time, while anony +mous subs are created at run-time.) For example, sub { my $a; sub f { $a } } At the time that f is created, it can't capture the current value +of $a, since the anonymous subroutine hasn't been created yet. Conversely +, the following won't give a warning since the anonymous subroutine +has by now been created and is live: sub { my $a; eval 'sub f { $a }' }->(); The second situation is caused by an eval accessing a variable tha +t has gone out of scope, for example, sub f { my $a; sub { eval '$a' } } f()->(); Here, when the '$a' in the eval is being compiled, f() is not curr +ently being executed, so its $a is not available for capture.

Replies are listed 'Best First'.
Re^4: How to know where I am going wrong in writing the grammar
by webfiend (Vicar) on Apr 01, 2009 at 16:26 UTC

    Confirmed that it's not just Windows. I installed ActivePerl 1004 (perl 5.10.0) on Ubuntu Jaunty and got the $errorparse error message.

    Update: Oh, and I got the error marker error using the Jaunty distro perl (5.10.0), so it's not a 5.10 problem either.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://754753]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (8)
As of 2019-09-19 05:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    The room is dark, and your next move is ...












    Results (240 votes). Check out past polls.

    Notices?