Skip to content

Commit

Permalink
Work on SL self-parsing: 1 test fails
Browse files Browse the repository at this point in the history
  • Loading branch information
- committed Dec 23, 2012
1 parent 920e2a4 commit 7d3e9b2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions r2/lib/Marpa/R2/Stuifzand.pm
Expand Up @@ -1820,7 +1820,7 @@ my %actions_by_lhs_symbol = (
);

sub parse_rules {
my ($thick_grammar, $string) = @_;
my ($thick_grammar, $p_rules_source) = @_;

state $meta_grammar = meta_grammar();
state $mask_by_rule_id =
Expand Down Expand Up @@ -1892,14 +1892,14 @@ sub parse_rules {
last STEP if not defined $type;
if ( $type eq 'MARPA_STEP_TOKEN' ) {
my ( undef, $token_value_ix, $arg_n ) = @step_data;
$stack[$arg_n] = $token_values[$token_value_ix];
$stack[$arg_n] = $token_values->[$token_value_ix];
next STEP;
}
if ( $type eq 'MARPA_STEP_RULE' ) {
my ( $rule_id, $arg_0, $arg_n ) = @step_data;

my @args = @stack[ $arg_0 .. $arg_n ];
if ( not defined $thin_grammar->sequence_min($rule_id) ) {
if ( not defined $thin_meta_g1_grammar->sequence_min($rule_id) ) {
my $mask = $mask_by_rule_id->[$rule_id];
@args = @args[ grep { $mask->[$_] } 0 .. $#args ];
}
Expand Down

0 comments on commit 7d3e9b2

Please sign in to comment.