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);
$$ = $<tree>6;
__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);
$$ = $<tree>10;
__IDL_assign_up_node ($$, $11);
IDL_TYPE_UNION ($$).switch_body = $11;
assign_props (IDL_TYPE_UNION ($$).ident, $1);
}
;