Jacek Caban : widl: Added importlib parsing code.

Alexandre Julliard julliard at wine.codeweavers.com
Fri Apr 21 06:17:26 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 8cd409facf35c74883f0b9ed215ef357cc6d2800
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=8cd409facf35c74883f0b9ed215ef357cc6d2800

Author: Jacek Caban <jacek at codeweavers.com>
Date:   Fri Apr 21 12:20:56 2006 +0200

widl: Added importlib parsing code.

---

 tools/widl/parser.y  |    3 +++
 tools/widl/typelib.c |    7 +++++++
 tools/widl/typelib.h |    1 +
 3 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 7ab2edf..9f288bf 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -251,6 +251,7 @@ imp_statements:					{}
 	| imp_statements coclassdef		{ if (!parse_only) add_coclass($2); }
 	| imp_statements moduledef		{ if (!parse_only) add_module($2); }
 	| imp_statements statement		{}
+	| imp_statements importlib		{}
 	;
 
 int_statements:					{ $$ = NULL; }
@@ -277,6 +278,8 @@ import_start: tIMPORT aSTRING ';'		{ ass
 import:   import_start imp_statements aEOF	{}
 	;
 
+importlib: tIMPORTLIB '(' aSTRING ')'		{ if(!parse_only) add_importlib($3); }
+
 libraryhdr: tLIBRARY aIDENTIFIER		{ $$ = $2; }
 	;
 library_start: attributes libraryhdr '{'	{ start_typelib($2, $1);
diff --git a/tools/widl/typelib.c b/tools/widl/typelib.c
index fe32c8f..fb8fd66 100644
--- a/tools/widl/typelib.c
+++ b/tools/widl/typelib.c
@@ -278,3 +278,10 @@ void add_typedef(type_t *tdef, var_t *na
      LINK(entry, typelib->entry);
      typelib->entry = entry;
 }
+
+void add_importlib(const char *name)
+{
+    if(!typelib) return;
+
+    warning("importlib is not yet supported.\n");
+}
diff --git a/tools/widl/typelib.h b/tools/widl/typelib.h
index d6ba5a7..0e1ed76 100644
--- a/tools/widl/typelib.h
+++ b/tools/widl/typelib.h
@@ -30,6 +30,7 @@ extern void add_module(type_t *module);
 extern void add_struct(type_t *structure);
 extern void add_enum(type_t *enumeration);
 extern void add_typedef(type_t *tdef, var_t *name);
+extern void add_importlib(const char *name);
 
 /* Copied from wtypes.h. Not included directly because that would create a
  * circular dependency (after all, wtypes.h is generated by widl...) */




More information about the wine-cvs mailing list