Rob Shearman : widl: Move the func_declarator rule entirely into direct_declarator.

Alexandre Julliard julliard at winehq.org
Fri Apr 25 08:11:11 CDT 2008


Module: wine
Branch: master
Commit: 242a8a02f565dc3c568ceaa921949b4fd662f01a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=242a8a02f565dc3c568ceaa921949b4fd662f01a

Author: Rob Shearman <rob at codeweavers.com>
Date:   Fri Apr 25 11:00:20 2008 +0100

widl: Move the func_declarator rule entirely into direct_declarator.

---

 tools/widl/parser.y |   12 +++---------
 1 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index d57d286..8e0ff86 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -300,7 +300,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
 %type <var> arg ne_union_field union_field s_field case enum constdef externdef
 %type <var_list> m_args no_args args fields ne_union_fields cases enums enum_list dispint_props field
 %type <var> m_ident t_ident ident
-%type <declarator> declarator func_declarator direct_declarator
+%type <declarator> declarator direct_declarator
 %type <declarator_list> declarator_list
 %type <func> funcdef
 %type <func_list> int_statements dispint_meths
@@ -970,18 +970,12 @@ declarator:
 	| direct_declarator
 	;
 
-func_declarator: direct_declarator '(' m_args ')'
-						{ $$ = $1;
-                                                  $$->type = append_ptrchain_type($$->type, make_func_type($3));
-						}
-	;
-
 direct_declarator:
 	  ident					{ $$ = make_declarator($1); }
 	| '(' declarator ')'			{ $$ = $2; }
 	| direct_declarator array		{ $$ = $1; $$->array = append_array($$->array, $2); }
-	| func_declarator			{ $$ = $1;
-						  $$->func_type = $$->type;
+	| direct_declarator '(' m_args ')'	{ $$ = $1;
+						  $$->func_type = append_ptrchain_type($$->type, make_func_type($3));
 						  $$->type = NULL;
 						}
 	;




More information about the wine-cvs mailing list