From 07f9ef61206e0555df4261e922a4e7fd021f33e7 Mon Sep 17 00:00:00 2001 From: Pragmatic Software Date: Wed, 2 Jul 2014 16:54:02 +0000 Subject: [PATCH] CGrammar: Remove "the list" from initializer lists; restore skipping of whitespace to struct/union/enum specifier --- PBot/VERSION.pm | 2 +- modules/c2english/CGrammar.pm | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/PBot/VERSION.pm b/PBot/VERSION.pm index 396bed31..c625c73c 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 => 693, + BUILD_REVISION => 694, BUILD_DATE => "2014-07-02", }; diff --git a/modules/c2english/CGrammar.pm b/modules/c2english/CGrammar.pm index 57b63b52..50e0dbd9 100644 --- a/modules/c2english/CGrammar.pm +++ b/modules/c2english/CGrammar.pm @@ -819,7 +819,7 @@ initializer: } } | '{' comment(?) initializer_list (',' )(?) '}' - { $return = 'the list { ' . $item{'initializer_list'} . ' }'; } + { $return = '{ ' . $item{'initializer_list'} . ' }'; } initializer_list: @@ -1129,7 +1129,7 @@ postfix_expression: | '(' type_name ')' '{' initializer_list '}' postfix_productions[context => "$arg{context}|compound literal"](?) { my $postfix = $item[-1]->[0]; - $return = "A compound-literal of type $item{type_name} initialized to the list { $item{initializer_list} }"; + $return = "A compound-literal of type $item{type_name} initialized to { $item{initializer_list} }"; $return = "$postfix $return" if $postfix; } @@ -1462,8 +1462,8 @@ type_specifier: | 'div_t' | 'ldiv_t' | 'lldiv_t' | 'imaxdiv_t' | 'cnd_t' | 'thrd_t' | 'tss_t' | 'mtx_t' | 'tss_dtor_t' | 'thrd_start_t' | 'once_flag' | 'clock_t' | 'time_t' - | struct_or_union_specifier - | enum_specifier + | struct_or_union_specifier + | enum_specifier | typedef_name) .../\W/ { $return = $item[3]; }