[PATCH 4/4] widl: Add support for using qualified interfaces.

Rémi Bernon rbernon at codeweavers.com
Mon Sep 28 03:19:00 CDT 2020


Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
 include/windows.media.speechsynthesis.idl |  2 +-
 tools/widl/parser.y                       | 21 +++++++++++++--------
 2 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/include/windows.media.speechsynthesis.idl b/include/windows.media.speechsynthesis.idl
index 9173f981958..9566697b42a 100644
--- a/include/windows.media.speechsynthesis.idl
+++ b/include/windows.media.speechsynthesis.idl
@@ -64,7 +64,7 @@ namespace Windows {
             ]
             runtimeclass VoiceInformation
             {
-                [default] interface IVoiceInformation;
+                [default] interface Windows.Media.SpeechSynthesis.IVoiceInformation;
             }
         }
     }
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index f20c9845ffb..8149b0c7ad9 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -277,7 +277,7 @@ static typelib_t *current_typelib;
 %type <str> namespacedef
 %type <type> base_type int_std
 %type <type> enumdef structdef uniondef typedecl
-%type <type> type qualified_seq qualified_type
+%type <type> type qualified_type
 %type <ifref> class_interface
 %type <ifref_list> class_interfaces
 %type <var> arg ne_union_field union_field s_field case enum enum_member declaration
@@ -835,15 +835,19 @@ int_std:  tINT					{ $$ = type_new_int(TYPE_BASIC_INT, 0); }
 	| tINT3264				{ $$ = type_new_int(TYPE_BASIC_INT3264, 0); }
 	;
 
-qualified_seq:
-      aKNOWNTYPE      { $$ = find_type_or_error($1, 0); }
-    | aIDENTIFIER '.' { push_lookup_namespace($1); } qualified_seq { $$ = $4; }
-    ;
+namespace_seq:
+	| aIDENTIFIER '.' { push_lookup_namespace($1); } namespace_seq
+	| aNAMESPACE '.' { push_lookup_namespace($1); } namespace_seq
+	;
+
+namespace_qual:
+	  aNAMESPACE '.' { init_lookup_namespace($1); } namespace_seq
+	;
 
 qualified_type:
-      aKNOWNTYPE     { $$ = find_type_or_error($1, 0); }
-    | aNAMESPACE '.' { init_lookup_namespace($1); } qualified_seq { $$ = $4; }
-    ;
+	  aKNOWNTYPE				{ $$ = find_type_or_error($1, 0); }
+	| namespace_qual aKNOWNTYPE		{ $$ = find_type_or_error($2, 0); }
+	;
 
 coclass:  tCOCLASS aIDENTIFIER			{ $$ = type_new_coclass($2); }
 	| tCOCLASS aKNOWNTYPE			{ $$ = find_type($2, NULL, 0);
@@ -934,6 +938,7 @@ inherit:					{ $$ = NULL; }
 
 interface: tINTERFACE aIDENTIFIER		{ $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
 	|  tINTERFACE aKNOWNTYPE		{ $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); }
+	|  tINTERFACE namespace_qual aKNOWNTYPE	{ $$ = get_type(TYPE_INTERFACE, $3, lookup_namespace, 0); }
 	;
 
 interfacehdr: attributes interface		{ $$ = $2;
-- 
2.28.0




More information about the wine-devel mailing list