Revision: 98
Author: cosimo.streppone
Date: Sun Sep 27 12:37:52 2009
Log: Tests pass successfully now.
I think this is a bad hack, and probably doesn't make sense,
as this file is probably autogenerated (?)
http://code.google.com/p/java2perl6/source/detail?r=98
Modified:
/trunk/lib/Java/Javap/Grammar.pm
=======================================
--- /trunk/lib/Java/Javap/Grammar.pm Tue Aug 11 02:50:42 2009
+++ /trunk/lib/Java/Javap/Grammar.pm Sun Sep 27 12:37:52 2009
@@ -6,6 +6,7 @@
package Parse::RecDescent::Java::Javap::Grammar;
use strict;
+use Carp ();
use vars qw($skip $AUTOLOAD );
$skip = '\s*';
@@ -3132,9 +3133,16 @@
q{comp_unit},
$tracelevel)
if defined $::RD_TRACE;
- $item{q{comp_stmt(?)}} = $_tok;
+
+ # Not sure why this was failing, but it appears to be matching only
arrays
+ #$item{q{comp_stmt(?)}} = $_tok;
+
+ # Assert comp_stmt result is array
+ if (ref $_tok ne 'ARRAY') {
+ Carp::croak "comp_stmt should match an array?";
+ }
+ $item{q{comp_stmt}} = $_tok->[0];
push @item, $_tok;
-
Parse::RecDescent::_trace(q{Trying subrule: [comp_unit_decl]},