On Wed, 13 Oct 2004, [EMAIL PROTECTED] wrote:

> package Blah;
> 
> our %hash;
> 
>$::RD_AUTOACTION = q{  $Blah::hash{$item[0]} = $item[0]; 1 };# f.e.
>       ........
> sub parse { 
>       my $self = shift;
>       my $str = join ' ',  @{ $$self{cmd} };
>       my $parser = new Parse::RecDescent ($grammar); 
>       $parser->start($str) or die "parsing error !!\n"; }
> 
> Now I want to do something like this :
> 
>$::RD_AUTOACTION = q{  $$self{_blah}{$item[0]} = $item[0]; 1 };
> 
> i.e. How to accesses object-instance-data from inside the grammar
> instead of the class-data.

I don't know the "proper" way, but why not make $parser a global
variable and access it that way from the auto-action?  Does it provide
what you need?

Ted

Reply via email to