--- a/c2iec.y +++ b/c2iec.y @@ -375,6 +375,9 @@ struct_declaration_list : struct_declaration + { + sprintf($<str>$, "%s",maptype($<str>1)); + } | struct_declaration_list struct_declaration { sprintf($<str>$, "%s %s",$<str>1, $<str>2); } ; @@ -402,7 +405,10 @@ specifier_qualifier_list : type_specifier specifier_qualifier_list - { sprintf($<str>$, "%s %s",$<str>1, $<str>2); } + { + sprintf($<str>$, "%s %s", $<str>1, $<str>2); + sprintf($<str>$, "%s",maptype($<str>$)); + } | type_specifier { strcpy($<str>$, maptype($<str>1)); @@ -472,10 +478,12 @@ direct_declarator : IDENTIFIER -// { sprintf($<str>$, "%s: %%s;\n",$<str>1); fifo_push($<str>$);} | '(' declarator ')' + { printf ("not supported direct_declerator\n"); } | direct_declarator '[' type_qualifier_list assignment_expression ']' + { printf ("not supported direct_declerator\n"); } | direct_declarator '[' type_qualifier_list ']' + { printf ("not supported direct_declerator\n"); } | direct_declarator '[' assignment_expression ']' { if (strlen($<str>1) > 0) @@ -489,7 +497,6 @@ sprintf($<str>1, ",0..(%s-1)] OF %%s;\n",$<str>3); strcpy($<str>$, p); strcpy(strchr($<str>$, ']'), $<str>1); -// sprintf($<str>$, p, $<str>1); } fifo_push(decl_all, $<str>$); strcpy($<str>$, "");