At 08:30 13/12/01 -0800, Brian Ingerson wrote:
> On 13/12/01 09:40 +0000, John McNamara wrote:
> > >
> > >New Features:
> > > ...
> > > - Remove dependency on Parse::RecDescent (precompile the parser)
> > > ...
> >
> > Will this work? The pre-compiled grammar will still have a run-time
> > dependency on Parse::RecDescent.
>
> That's not my understanding of how it works.
>
> I'm pretty sure that P::RD bundles in the runtime components.
Unfortunately not. The first line of the compiled package is:
use Parse::RecDescent;
Also P:RD is dependent on Text::Balanced.
Parse::Yapp allows you to create a standalone parser. On a project that is
unrelated to inline I am planning to port a P::RD parser to P::Y to see if
there is any speed improvement. The bundling feature is also an attraction.
Hopefully, I can report back after that.
John.
--
sub array_index { # Given an item and an array, return the index
@_{@_}=-1..@_; # of the item in the array or -1 if not found.
$_{$_[0]} #
} # Ex. array_index("red", @colours);