On Sat, Sep 27, 2014 at 12:54 AM, Christopher Layne
wrote:
> Couldn't you just not use unproductive_ok and inaccessible_ok?
>
Yes I could, and tried that at first, but that issued warnings I hated
silencing.
>
> On Sep 26, 2014, at 0930 PT, Ruslan Shvedov
> wrote:
>
> > Unproductive and unacces
Couldn't you just not use unproductive_ok and inaccessible_ok?
On Sep 26, 2014, at 0930 PT, Ruslan Shvedov wrote:
> Unproductive and unaccessible rules can be removed from a grammar easily
> using code like this:
>
> # cleanup the grammar using Marpa NAIF
> my $grammar = Marpa::R2::Grammar->ne
Unproductive and unaccessible rules can be removed from a grammar easily
using code like this:
# cleanup the grammar using Marpa NAIF
my $grammar = Marpa::R2::Grammar->new({
start => ...,
rules => ...,
unproductive_ok => 1,
inaccessible_ok => 1,
});
$grammar->precompute();
my $rules = $gramm