Skip to content

Commit

Permalink
Add Marpa::R2::Grammar::_rule_mask()
Browse files Browse the repository at this point in the history
  • Loading branch information
- committed Dec 22, 2012
1 parent e78740f commit 74ca034
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions r2/lib/Marpa/R2/Grammar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,15 @@ sub Marpa::R2::Grammar::rule {
return @symbol_names;
} ## end sub Marpa::R2::Grammar::rule

# Internal, for use with in coordinating thin and thick
# interfaces. NOT DOCUMENTED.
sub Marpa::R2::Grammar::_rule_mask {
my ( $grammar, $rule_id ) = @_;
my $rules = $grammar->[Marpa::R2::Internal::Grammar::RULES];
my $rule = $rules->[$rule_id];
return $rule->[Marpa::R2::Internal::Rule::MASK];
} ## end sub Marpa::R2::Grammar::rule

# Deprecated and for removal
# Used in blog post, and part of
# CPAN version 2.023_008 but
Expand Down

0 comments on commit 74ca034

Please sign in to comment.