From 9597833b329f94c3563ac59fa6208f6a0523490c Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Thu, 12 Jun 2014 14:19:39 +0000 Subject: [PATCH] CGrammar: Function prototypes can appear in delcaration section --- PBot/VERSION.pm | 2 +- modules/c2english/CGrammar.pm | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index a014a12e..d00ed01a 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 => 635, + BUILD_REVISION => 636, BUILD_DATE => "2014-06-12", }; diff --git a/modules/c2english/CGrammar.pm b/modules/c2english/CGrammar.pm index 3a0a887d..0f46919d 100644 --- a/modules/c2english/CGrammar.pm +++ b/modules/c2english/CGrammar.pm @@ -614,7 +614,8 @@ declaration_list: { $return = join('', @{$item{'preproc(?)'}}) . join('', @{$item{'declaration(s)'}}); } declaration: - declaration_specifiers init_declarator_list(?) ';' + function_prototype + | declaration_specifiers init_declarator_list(?) ';' { # 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]} : ('');