[Forgot recdescent on mail list, thought it might be good to archive.]

On Friday, Jun 11, 2004 Aamer Akhter said:

> 
> On Jun 11, 2004, at 11:49 AM, Ron D. Smith wrote:
> 
> > On Friday, Jun 11, 2004 Aamer Akhter said:
> >> Hello,
> >>
> >>   Is there a way to detect that prd ran into an error?
> >
> > The answer to your question is so obvious that I suspect you are either
> > really asking a different question or that "I don't get it".
> 
> I may not have explained properly. Here is an example of the error I 
> was getting:
> 
>       ERROR (line 123): Untranslatable item encountered: ".*?)\n/"
>                  (Hint: Set $::RD_HINT (or -RD_HINT if you're using 
> "perl -s")
>                         for hints on fixing these problems.)
> 
> But Parse::RecDescent definitely returns something:
> 
>      use Data::Dumper; print Dumper (Parse::RecDescent->new($grammar));
> exit
> 
> gives me:
> 
> $VAR1 = bless( {
>                   '_AUTOTREE' => undef,
>                   'localvars' => '',
>                   'startcode' => '',
>                   '_check' => {
>                                 'thisoffset' => '',
>                                 'itempos' => '',
>                                 'prevoffset' => '',
>                                 'prevline' => '',
>                                 'prevcolumn' => '',
>                                 'thiscolumn' => ''
> 
> 
> should this case have returned a undef instead?

Um, I'm not sure, actually.  I would have thought so but I have never had to 
code a script where I anticipated failure AS A NORMAL OPERATION.  (In other 
words, I have had lots of problems in debug, but once it worked, it just 
worked...)

Perhaps it has something to do with the fact that you are using autotree.

Can you supply a simple test case?  Its hard to see what might be happening 
based on the extracted snippets from above.

Perhaps one of the Gurus can weigh in?

> -- 
> Aamer Akhter / [EMAIL PROTECTED]
> NSITE cisco Systems

- --
 Intel, Corp.
 5000 W. Chandler Blvd.
 Chandler, AZ 85226

- -- 
 Intel, Corp.
 5000 W. Chandler Blvd.
 Chandler, AZ  85226


------- End of Forwarded Message


-- 
 Intel, Corp.
 5000 W. Chandler Blvd.
 Chandler, AZ  85226



-- 
 Intel, Corp.
 5000 W. Chandler Blvd.
 Chandler, AZ  85226


Reply via email to