diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index c32f5a4b..178d2b4e 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 => 659, + BUILD_REVISION => 660, BUILD_DATE => "2014-06-20", }; diff --git a/modules/c2english/CGrammar.pm b/modules/c2english/CGrammar.pm index a810ddca..3ad5e98c 100644 --- a/modules/c2english/CGrammar.pm +++ b/modules/c2english/CGrammar.pm @@ -1382,24 +1382,25 @@ constant: } else { $return = $item[1]; } + $return .= '0' if $return =~ /\.$/; } - | /0x[0-9a-f]+[lu]{0,2}/i + | /0x[0-9a-f]+[lu]{0,3}/i { $return .= 'unsigned ' if $item[1] =~ s/[Uu]//; - $return .= 'long ' if $item[1] =~ s/[Ll]//; + $return .= 'long ' while $item[1] =~ s/[Ll]//; $return = "the $return" . "hexadecimal number $item[1]"; } - | /0\d+[lu]{0,2}/i + | /0\d+[lu]{0,3}/i { $return .= 'unsigned ' if $item[1] =~ s/[Uu]//; - $return .= 'long ' if $item[1] =~ s/[Ll]//; + $return .= 'long ' while $item[1] =~ s/[Ll]//; $return = "the $return" . "octal number $item[1]"; } - |/-?[0-9]+[lu]{0,2}/i # integer constant + | /-?[0-9]+[lu]{0,3}/i # integer constant { - $return = $item[-1]; - $return = "long $return" if $return =~ s/[Ll]//; - $return = "unsigned $return" if $return =~ s/[Uu]//; + $return .= "unsigned " if $item[-1] =~ s/[Uu]//; + $return .= "long " while $item[-1] =~ s/[Ll]//; + $return .= $item[-1]; } | /(?:\'((?:\\\'|(?!\').)*)\')/ # character constant {