diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index d53e7d44..90afc09d 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,7 +13,7 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 631, + BUILD_REVISION => 632, BUILD_DATE => "2014-06-11", }; diff --git a/modules/c2english/CGrammar.pm b/modules/c2english/CGrammar.pm index 5d63a02e..5352ed8b 100644 --- a/modules/c2english/CGrammar.pm +++ b/modules/c2english/CGrammar.pm @@ -604,6 +604,7 @@ declaration_list: declaration: declaration_specifiers init_declarator_list(?) ';' { + print STDERR "wtf\n"; print STDERR ::Dumper \%item; # This whole thing needs to be re-written to parse declarations inside-out. my @init_list = defined $item{'init_declarator_list(?)'}->[0] ? @{$item{'init_declarator_list(?)'}->[0]} : (''); my $init_declaration_list; @@ -689,7 +690,7 @@ declaration: $return .= ' be '; if($first_qualifier) { - if(@identifiers == 1) { + if(@identifiers == 1 and $first_qualifier !~ /^(a|an)\s+/) { $return .= $first_qualifier =~ m/^[aeiouy]/ ? 'an ' : 'a '; } $return .= "$first_qualifier $item{declaration_specifiers}"; @@ -1024,7 +1025,7 @@ array_declarator: { my @array = @{$item[-1]}; if (@array) { - $return .= 'an array of ' . join('of an array of ' , @array) . 'of '; + $return .= 'an array of ' . join('of an array of ' , @array) . 'of'; } else { undef; }