Re: bison 2.4 breaks libIDL 0.8.11 build

2008-11-05 Thread Juergen Daubert
On Tue, Nov 04, 2008 at 02:40:00PM -0500, Joel E. Denny wrote:

[...]
 
 I suggest you report this bug to the maintainers of libIDL.

I've done that, see [1]. Many thanks for your analysis. 

kind regards
Juergen

[1] http://bugzilla.gnome.org/show_bug.cgi?id=559395

-- 
Juergen Daubert  |  mailto:[EMAIL PROTECTED]  
Korb, Germany|  http://jue.li/crux





Re: bison 2.4 breaks libIDL 0.8.11 build

2008-11-04 Thread Akim Demaille


Le 4 nov. 08 à 19:08, Juergen Daubert a écrit :


On Tue, Nov 04, 2008 at 09:59:53AM -0500, Joel E. Denny wrote:

On Tue, 4 Nov 2008, Juergen Daubert wrote:

tried to build libIDL 0.8.11 [1] with bison 2.4 and got the  
following

error message, while building with 2.3 just works fine:

$ make
bison -y -d -v 2/dev/null ./parser.y
make: *** [stamp-parser] Error 1

and after removing the redirect and calling the above manually:

$ bison -y -d -v ./parser.y
./parser.y:610.9-10: $$ for the midrule at $6 of `struct_type' has  
no declared type
./parser.y:627.9-10: $$ for the midrule at $10 of `union_type' has  
no declared type


Thanks for the report.  Please post the relevant portion of the  
grammar.




Here's the relevant part of libIDLs parser.y:


   struct_type: z_props TOK_STRUCT
   { $str$ = struct; }
   z_new_scope_catch '{'{
   g_hash_table_insert (__IDL_structunion_ht, $4, $4);
610:$$ = IDL_type_struct_new ($4, NULL);
   }member_list
   '}' pop_scope{
   g_hash_table_remove (__IDL_structunion_ht, $4);
   $$ = $tree6;
   __IDL_assign_up_node ($$, $7);
   IDL_TYPE_STRUCT ($$).member_list = $7;
   assign_props (IDL_TYPE_STRUCT ($$).ident, $1);
   }
   ;

   union_type:  z_props TOK_UNION
   { $str$ = union; }
   z_new_scope_catch TOK_SWITCH '('
   switch_type_spec
   ')' '{'  {
   g_hash_table_insert (__IDL_structunion_ht, $4, $4);
627:$$ = IDL_type_union_new ($4, $7, NULL);
   }switch_body
   '}' pop_scope{
   g_hash_table_remove (__IDL_structunion_ht, $4);
   $$ = $tree10;
   __IDL_assign_up_node ($$, $11);
   IDL_TYPE_UNION ($$).switch_body = $11;
   assign_props (IDL_TYPE_UNION ($$).ident, $1);
   }
   ;


The message is correct: $$ is used, but Bison has no way to understand  
why kind of semantic value is to be used here.  See for instance the  
other uses such that



   { $str$ = struct; }



You cannot use $$ in a mid-rule action, you need to specify the type  
tag.






Re: bison 2.4 breaks libIDL 0.8.11 build

2008-11-04 Thread Sergei Steshenko



--- On Tue, 11/4/08, Akim Demaille [EMAIL PROTECTED] wrote:

 From: Akim Demaille [EMAIL PROTECTED]
 Subject: Re: bison 2.4 breaks libIDL 0.8.11 build
 To: [EMAIL PROTECTED]
 Cc: Juergen Daubert [EMAIL PROTECTED], bug-bison@gnu.org
 Date: Tuesday, November 4, 2008, 11:40 AM
 Le 4 nov. 08 à 15:45, Sergei Steshenko a écrit :
 
  You have probably also read
  
 
 http://lists.gnu.org/archive/html/bug-bison/2008-11/msg1.html
  
  thread.
  
  Since too many things are broken by bison 2.4 I
 suggest to
  recall/remove/blacklist this release. I.e. the release
 doesn't feel
  production-worthy.
 
 Dear Sergei,
 
 This is a bit harsh.  WRT the ; issue, AFAIR POSIX requires
 that the user provides a complete command.  So GCC's
 treelang should be fixed.  I am trying to build it so that I
 can send them the patch. Bison 2.4.1 will make special
 adjustments so that Treelang 4.3.2 builds properly, but
 hopefully when Bison 2.5 is out, the GCC team will have make
 releases with a fixed grammar and the workaround will no
 longer be needed.

Probably this is harsh.

But look at this from end user's point of view - something used to work
and now it doesn't.

I think that monumental projects like 'bison' should have a regression
suite which includes major users of their code.

By the way, I'm building 'gcc' using my AppsFromScratch, and I'm also
building 'libIDL' in the same framework. I didn't try to build 'libIDL'
because 'gcc' failure was enough of show stopper for me, otherwise I would
have uncovered the 'libIDL' issue too.

AppsFromScratch happens to be a really good regression testing tool,
look, for example, at another recently reported regression issue:

http://lists.gnu.org/archive/html/bug-libtool/2008-11/msg6.html
.

So, if you are interested,l I can send you a snapshot and explain how to
use it. I myself depend on the tool, so I have personal interest in
maintaining it.

My point is that even if 'gcc', 'libIDL', etc developers write erroneous
grammars, new 'bison' releases should be accompanied by release notes
notifying big users of problems uncovered in their code.

Thanks,
  Sergei.







Re: bison 2.4 breaks libIDL 0.8.11 build

2008-11-04 Thread Joel E. Denny
On Tue, 4 Nov 2008, Juergen Daubert wrote:

 tried to build libIDL 0.8.11 [1] with bison 2.4 and got the following
 error message, while building with 2.3 just works fine:
 
 $ make
 bison -y -d -v 2/dev/null ./parser.y
 make: *** [stamp-parser] Error 1
 
 and after removing the redirect and calling the above manually:
 
 $ bison -y -d -v ./parser.y
 ./parser.y:610.9-10: $$ for the midrule at $6 of `struct_type' has no 
 declared type
 ./parser.y:627.9-10: $$ for the midrule at $10 of `union_type' has no 
 declared type

Thanks for the report.  Please post the relevant portion of the grammar.