[libmarpa-r2-perl] 07/14: Adding marpa_g_force_valued(): t+
Jonas Smedegaard
dr at jones.dk
Sat May 17 21:24:08 UTC 2014
This is an automated email from the git hooks/post-receive script.
js pushed a commit to annotated tag Marpa-R2-2.085_003
in repository libmarpa-r2-perl.
commit b4ac0001c3631aef0fea4c6f13608437e741efdd
Author: Jeffrey Kegler <JKEGL at cpan.org>
Date: Sun Apr 20 22:12:22 2014 -0700
Adding marpa_g_force_valued(): t+
---
cpan/lib/Marpa/R2/Grammar.pm | 3 +++
cpan/lib/Marpa/R2/SLR.pm | 2 +-
cpan/xs/R2.xs | 3 ++-
cpan/xs/gp_generate.pl | 1 +
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/cpan/lib/Marpa/R2/Grammar.pm b/cpan/lib/Marpa/R2/Grammar.pm
index aa2e6d5..a264f03 100644
--- a/cpan/lib/Marpa/R2/Grammar.pm
+++ b/cpan/lib/Marpa/R2/Grammar.pm
@@ -632,6 +632,9 @@ sub Marpa::R2::Internal::Grammar::slif_precompute {
} ## end if ($problems)
return if $grammar_c->is_precomputed();
+ if ($grammar_c->force_valued() < 0) {
+ Marpa::R2::uncaught_error( scalar $grammar_c->error() );
+ }
set_start_symbol($grammar);
diff --git a/cpan/lib/Marpa/R2/SLR.pm b/cpan/lib/Marpa/R2/SLR.pm
index 357d972..5c394ce 100644
--- a/cpan/lib/Marpa/R2/SLR.pm
+++ b/cpan/lib/Marpa/R2/SLR.pm
@@ -942,7 +942,7 @@ sub Marpa::R2::Scanless::R::resume {
or
Marpa::R2::exception("Could not say(): $ERRNO");
} ## end if ( $trace_terminals >= 2 )
- push @ops, $op_alternative, $symbol_id, 0, 1;
+ push @ops, $op_alternative, $symbol_id, 1, 1;
} ## end if ( $character =~ $re )
} ## end for my $entry ( @{$character_class_table} )
diff --git a/cpan/xs/R2.xs b/cpan/xs/R2.xs
index 53de8a5..00776b5 100644
--- a/cpan/xs/R2.xs
+++ b/cpan/xs/R2.xs
@@ -813,10 +813,11 @@ if (trace_lexers >= 1)
slr->codepoint = codepoint;
slr->input_symbol_id = symbol_id;
croak
- ("Problem alternative() failed at char ix %ld; symbol id %ld; codepoint 0x%lx\n"
+ ("Problem alternative() failed at char ix %ld; symbol id %ld; codepoint 0x%lx value %ld\n"
"Problem in u_read(), alternative() failed: %s",
(long) slr->perl_pos, (long) symbol_id,
(unsigned long) codepoint,
+ (long) value,
xs_g_error (slr->current_lexer->g_wrapper));
}
}
diff --git a/cpan/xs/gp_generate.pl b/cpan/xs/gp_generate.pl
index 9cd6b43..81c1bdc 100644
--- a/cpan/xs/gp_generate.pl
+++ b/cpan/xs/gp_generate.pl
@@ -158,6 +158,7 @@ print {$out} 'MODULE = Marpa::R2 PACKAGE = Marpa::R2::Thin::G', "\n\n";
say {$out} gp_generate(qw(error_clear));
say {$out} gp_generate(qw(event_count));
+say {$out} gp_generate(qw(force_valued));
say {$out} gp_generate(qw(has_cycle));
say {$out} gp_generate(qw(highest_rule_id));
say {$out} gp_generate(qw(highest_symbol_id));
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmarpa-r2-perl.git
More information about the Pkg-perl-cvs-commits
mailing list