From f898580d3384235cdc663b402f448e6cabf4b14d Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 18 Jun 2014 22:31:56 +0000 Subject: [PATCH] CGrammar: Fix `int const i` to translate to `constant int i` instead of `int constant i` --- PBot/VERSION.pm | 4 ++-- modules/c2english/CGrammar.pm | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 2851b2cf..ff813174 100644 --- a/PBot/VERSION.pm +++ b/PBot/VERSION.pm @@ -13,8 +13,8 @@ use warnings; # These are set automatically by the build/commit script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 654, - BUILD_DATE => "2014-06-17", + BUILD_REVISION => 655, + BUILD_DATE => "2014-06-18", }; 1; diff --git a/modules/c2english/CGrammar.pm b/modules/c2english/CGrammar.pm index 010f99cb..72a75ebc 100644 --- a/modules/c2english/CGrammar.pm +++ b/modules/c2english/CGrammar.pm @@ -1238,12 +1238,15 @@ declaration_specifiers: | comment(?) type_specifier declaration_specifiers(?) { my $decl_spec = join(' ', @{$item{'declaration_specifiers(?)'}}); - $return = join('',@{$item{'comment(?)'}}) . $item{type_specifier}; - if ($decl_spec) { $return .= ' ' . $decl_spec; } + $return = join('',@{$item{'comment(?)'}}); + $return .= "$decl_spec " if $decl_spec; + $return .= $item{type_specifier}; } | comment(?) type_qualifier declaration_specifiers(?) { - my $decl_spec = $return = join('',@{$item{'comment(?)'}}) . $item{type_qualifier} . ' ' . join(' ',@{$item{'declaration_specifiers(?)'}}); + my $decl_spec = join(' ',@{$item{'declaration_specifiers(?)'}}); + $return = join('',@{$item{'comment(?)'}}) . $item{type_qualifier}; + $return .= " $decl_spec" if $decl_spec; } storage_class_specifier: