Signed-off-by: Rémi Bernon rbernon@codeweavers.com ---
This is the first part of a refactoring series, to cleanup namespace usage, and ultimately better support qualified type names.
tools/widl/parser.y | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 480552e3723..328829cc0da 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -76,7 +76,6 @@ static warning_list_t *append_warning(warning_list_t *, int);
static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); static type_t *find_type_or_error(const char *name, int t); -static type_t *find_type_or_error2(char *name, int t);
static var_t *reg_const(var_t *var);
@@ -1015,7 +1014,7 @@ interfacedef: interfacehdr inherit | interfacehdr ':' aIDENTIFIER '{' import int_statements '}' semicolon_opt { $$ = $1; - type_interface_define($$, find_type_or_error2($3, 0), $6); + type_interface_define($$, find_type_or_error($3, 0), $6); } | dispinterfacedef semicolon_opt { $$ = $1; } ; @@ -1255,7 +1254,7 @@ acf_int_statement
acf_interface : acf_attributes tINTERFACE aKNOWNTYPE '{' acf_int_statements '}' - { type_t *iface = find_type_or_error2($3, 0); + { type_t *iface = find_type_or_error($3, 0); if (type_get_type(iface) != TYPE_INTERFACE) error_loc("%s is not an interface\n", iface->name); iface->attrs = append_attr_list(iface->attrs, $1); @@ -2105,13 +2104,6 @@ static type_t *find_type_or_error(const char *name, int t) return type; }
-static type_t *find_type_or_error2(char *name, int t) -{ - type_t *tp = find_type_or_error(name, t); - free(name); - return tp; -} - int is_type(const char *name) { return find_type(name, current_namespace, 0) != NULL ||
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- tools/widl/parser.y | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 328829cc0da..a610a630282 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -75,7 +75,7 @@ static void append_chain_callconv(type_t *chain, char *callconv); static warning_list_t *append_warning(warning_list_t *, int);
static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); -static type_t *find_type_or_error(const char *name, int t); +static type_t *find_type_or_error(const char *name);
static var_t *reg_const(var_t *var);
@@ -859,17 +859,17 @@ ident: aIDENTIFIER { $$ = make_var($1); } | aKNOWNTYPE { $$ = make_var($<str>1); } ;
-base_type: tBYTE { $$ = find_type_or_error($<str>1, 0); } - | tWCHAR { $$ = find_type_or_error($<str>1, 0); } +base_type: tBYTE { $$ = find_type_or_error($<str>1); } + | tWCHAR { $$ = find_type_or_error($<str>1); } | int_std | tSIGNED int_std { $$ = type_new_int(type_basic_get_type($2), -1); } | tUNSIGNED int_std { $$ = type_new_int(type_basic_get_type($2), 1); } | tUNSIGNED { $$ = type_new_int(TYPE_BASIC_INT, 1); } - | tFLOAT { $$ = find_type_or_error($<str>1, 0); } - | tDOUBLE { $$ = find_type_or_error($<str>1, 0); } - | tBOOLEAN { $$ = find_type_or_error($<str>1, 0); } - | tERRORSTATUST { $$ = find_type_or_error($<str>1, 0); } - | tHANDLET { $$ = find_type_or_error($<str>1, 0); } + | tFLOAT { $$ = find_type_or_error($<str>1); } + | tDOUBLE { $$ = find_type_or_error($<str>1); } + | tBOOLEAN { $$ = find_type_or_error($<str>1); } + | tERRORSTATUST { $$ = find_type_or_error($<str>1); } + | tHANDLET { $$ = find_type_or_error($<str>1); } ;
m_int: @@ -888,12 +888,12 @@ int_std: tINT { $$ = type_new_int(TYPE_BASIC_INT, 0); } ;
qualified_seq: - aKNOWNTYPE { $$ = find_type_or_error($1, 0); } + aKNOWNTYPE { $$ = find_type_or_error($1); } | aIDENTIFIER '.' { push_lookup_namespace($1); } qualified_seq { $$ = $4; } ;
qualified_type: - aKNOWNTYPE { $$ = find_type_or_error($1, 0); } + aKNOWNTYPE { $$ = find_type_or_error($1); } | aNAMESPACE '.' { init_lookup_namespace($1); } qualified_seq { $$ = $4; } ;
@@ -1014,7 +1014,7 @@ interfacedef: interfacehdr inherit | interfacehdr ':' aIDENTIFIER '{' import int_statements '}' semicolon_opt { $$ = $1; - type_interface_define($$, find_type_or_error($3, 0), $6); + type_interface_define($$, find_type_or_error($3), $6); } | dispinterfacedef semicolon_opt { $$ = $1; } ; @@ -1247,14 +1247,14 @@ acf_int_statements
acf_int_statement : tTYPEDEF acf_attributes aKNOWNTYPE ';' - { type_t *type = find_type_or_error($3, 0); + { type_t *type = find_type_or_error($3); type->attrs = append_attr_list(type->attrs, $2); } ;
acf_interface : acf_attributes tINTERFACE aKNOWNTYPE '{' acf_int_statements '}' - { type_t *iface = find_type_or_error($3, 0); + { type_t *iface = find_type_or_error($3); if (type_get_type(iface) != TYPE_INTERFACE) error_loc("%s is not an interface\n", iface->name); iface->attrs = append_attr_list(iface->attrs, $1); @@ -2092,11 +2092,11 @@ type_t *find_type(const char *name, struct namespace *namespace, int t) return NULL; }
-static type_t *find_type_or_error(const char *name, int t) +static type_t *find_type_or_error(const char *name) { type_t *type; - if (!(type = find_type(name, current_namespace, t)) && - !(type = find_type(name, lookup_namespace, t))) + if (!(type = find_type(name, current_namespace, 0)) && + !(type = find_type(name, lookup_namespace, 0))) { error_loc("type '%s' not found\n", name); return NULL; @@ -2909,7 +2909,7 @@ static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func) * function */ var_t *idl_handle = make_var(xstrdup("IDL_handle")); idl_handle->attrs = append_attr(NULL, make_attr(ATTR_IN)); - idl_handle->declspec.type = find_type_or_error("handle_t", 0); + idl_handle->declspec.type = find_type_or_error("handle_t"); type_function_add_head_arg(func->declspec.type, idl_handle); } } @@ -3200,7 +3200,7 @@ static statement_t *make_statement_typedef(declarator_list_t *decls, int declonl LIST_FOR_EACH_ENTRY_SAFE( decl, next, decls, declarator_t, entry ) { var_t *var = decl->var; - type_t *type = find_type_or_error(var->name, 0); + type_t *type = find_type_or_error(var->name); *type_list = xmalloc(sizeof(type_list_t)); (*type_list)->type = type; (*type_list)->next = NULL;
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- tools/widl/parser.y | 24 ++++++------------------ tools/widl/typetree.c | 25 ++++++++++++++----------- tools/widl/typetree.h | 6 ++++-- 3 files changed, 24 insertions(+), 31 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index a610a630282..db4fdb253ad 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -98,7 +98,6 @@ static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs); const char *get_attr_display_name(enum attr_type type); @@ -306,7 +305,7 @@ static typelib_t *current_typelib; %type <declarator> m_any_declarator any_declarator any_declarator_no_direct any_direct_declarator %type <declarator> m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator %type <declarator_list> declarator_list struct_declarator_list -%type <type> coclass coclasshdr coclassdef +%type <type> coclass coclassdef %type <type> runtimeclass runtimeclass_hdr runtimeclass_def %type <type> apicontract %type <num> contract_ver @@ -897,23 +896,12 @@ qualified_type: | aNAMESPACE '.' { init_lookup_namespace($1); } qualified_seq { $$ = $4; } ;
-coclass: tCOCLASS aIDENTIFIER { $$ = type_new_coclass($2); } - | tCOCLASS aKNOWNTYPE { $$ = find_type($2, NULL, 0); - if (type_get_type_detect_alias($$) != TYPE_COCLASS) - error_loc("%s was not declared a coclass at %s:%d\n", - $2, $$->loc_info.input_name, - $$->loc_info.line_number); - } - ; - -coclasshdr: attributes coclass { $$ = $2; - check_def($$); - $$->attrs = check_coclass_attrs($2->name, $1); - } +coclass: tCOCLASS aIDENTIFIER { $$ = type_coclass_declare($2); } + | tCOCLASS aKNOWNTYPE { $$ = type_coclass_declare($2); } ;
-coclassdef: coclasshdr '{' class_interfaces '}' semicolon_opt - { $$ = type_coclass_define($1, $3); } +coclassdef: attributes coclass '{' class_interfaces '}' semicolon_opt + { $$ = type_coclass_define($2, $1, $4); } ;
runtimeclass: @@ -2528,7 +2516,7 @@ static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs) return attrs; }
-static attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs) +attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs) { const attr_t *attr; if (!attrs) return attrs; diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index a18ffe1f4a5..cfd186fb02b 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -205,16 +205,6 @@ type_t *type_new_module(char *name) return type; }
-type_t *type_new_coclass(char *name) -{ - type_t *type = get_type(TYPE_COCLASS, name, NULL, 0); - if (type->type_type != TYPE_COCLASS || type->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - type->name, type->loc_info.input_name, type->loc_info.line_number); - type->name = name; - return type; -} - type_t *type_new_runtimeclass(char *name, struct namespace *namespace) { type_t *type = get_type(TYPE_RUNTIMECLASS, name, NULL, 0); @@ -512,8 +502,21 @@ void type_module_define(type_t *module, statement_list_t *stmts) module->defined = TRUE; }
-type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces) +type_t *type_coclass_declare(char *name) +{ + type_t *type = get_type(TYPE_COCLASS, name, NULL, 0); + if (type_get_type_detect_alias(type) != TYPE_COCLASS) + error_loc("coclass %s previously not declared a coclass at %s:%d\n", + type->name, type->loc_info.input_name, type->loc_info.line_number); + return type; +} + +type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *ifaces) { + if (coclass->defined) + error_loc("coclass %s already defined at %s:%d\n", + coclass->name, coclass->loc_info.input_name, coclass->loc_info.line_number); + coclass->attrs = check_coclass_attrs(coclass->name, attrs); coclass->details.coclass.ifaces = ifaces; coclass->defined = TRUE; return coclass; diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h index dc44c3f5fa7..69d00dee49b 100644 --- a/tools/widl/typetree.h +++ b/tools/widl/typetree.h @@ -29,6 +29,8 @@ enum name_type { NAME_C };
+attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); + type_t *type_new_function(var_list_t *args); type_t *type_new_pointer(type_t *ref); type_t *type_new_alias(const decl_spec_t *t, const char *name); @@ -38,7 +40,7 @@ type_t *type_new_array(const char *name, const decl_spec_t *element, int declptr type_t *type_new_basic(enum type_basic_type basic_type); type_t *type_new_int(enum type_basic_type basic_type, int sign); type_t *type_new_void(void); -type_t *type_new_coclass(char *name); +type_t *type_coclass_declare(char *name); type_t *type_new_enum(const char *name, struct namespace *namespace, int defined, var_list_t *enums); type_t *type_new_struct(char *name, struct namespace *namespace, int defined, var_list_t *fields); type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields); @@ -49,7 +51,7 @@ void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stm void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods); void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface); void type_module_define(type_t *module, statement_list_t *stmts); -type_t *type_coclass_define(type_t *coclass, ifref_list_t *ifaces); +type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *ifaces); type_t *type_runtimeclass_define(type_t *runtimeclass, ifref_list_t *ifaces); int type_is_equal(const type_t *type1, const type_t *type2); const char *type_get_name(const type_t *type, enum name_type name_type);
Signed-off-by: Jacek Caban jacek@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- tools/widl/parser.y | 23 ++++++----------------- tools/widl/typetree.c | 26 ++++++++++++++------------ tools/widl/typetree.h | 5 +++-- 3 files changed, 23 insertions(+), 31 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index db4fdb253ad..5008a35f64f 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -98,7 +98,6 @@ static attr_list_t *check_field_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_library_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_dispiface_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_module_attrs(const char *name, attr_list_t *attrs); -static attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs); static attr_list_t *check_apicontract_attrs(const char *name, attr_list_t *attrs); const char *get_attr_display_name(enum attr_type type); static void add_explicit_handle_if_necessary(const type_t *iface, var_t *func); @@ -306,7 +305,7 @@ static typelib_t *current_typelib; %type <declarator> m_abstract_declarator abstract_declarator abstract_declarator_no_direct abstract_direct_declarator %type <declarator_list> declarator_list struct_declarator_list %type <type> coclass coclassdef -%type <type> runtimeclass runtimeclass_hdr runtimeclass_def +%type <type> runtimeclass runtimeclass_def %type <type> apicontract %type <num> contract_ver %type <num> pointer_type threading_type marshaling_behavior version @@ -905,22 +904,12 @@ coclassdef: attributes coclass '{' class_interfaces '}' semicolon_opt ;
runtimeclass: - tRUNTIMECLASS aIDENTIFIER { $$ = type_new_runtimeclass($2, current_namespace); } - | tRUNTIMECLASS aKNOWNTYPE { $$ = find_type($2, NULL, 0); - if (type_get_type_detect_alias($$) != TYPE_RUNTIMECLASS) - error_loc("%s was not declared a runtimeclass at %s:%d\n", $2, - $$->loc_info.input_name, $$->loc_info.line_number); - } - ; - -runtimeclass_hdr: attributes runtimeclass { $$ = $2; - check_def($$); - $$->attrs = check_runtimeclass_attrs($2->name, $1); - } + tRUNTIMECLASS aIDENTIFIER { $$ = type_runtimeclass_declare($2, current_namespace); } + | tRUNTIMECLASS aKNOWNTYPE { $$ = type_runtimeclass_declare($2, current_namespace); } ;
-runtimeclass_def: runtimeclass_hdr '{' class_interfaces '}' semicolon_opt - { $$ = type_runtimeclass_define($1, $3); } +runtimeclass_def: attributes runtimeclass '{' class_interfaces '}' semicolon_opt + { $$ = type_runtimeclass_define($2, $1, $4); } ;
apicontract: attributes tAPICONTRACT aIDENTIFIER '{' '}' @@ -2529,7 +2518,7 @@ attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs) return attrs; }
-static attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs) +attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs) { const attr_t *attr; if (!attrs) return attrs; diff --git a/tools/widl/typetree.c b/tools/widl/typetree.c index cfd186fb02b..825348ddef4 100644 --- a/tools/widl/typetree.c +++ b/tools/widl/typetree.c @@ -205,17 +205,6 @@ type_t *type_new_module(char *name) return type; }
-type_t *type_new_runtimeclass(char *name, struct namespace *namespace) -{ - type_t *type = get_type(TYPE_RUNTIMECLASS, name, NULL, 0); - if (type->type_type != TYPE_RUNTIMECLASS || type->defined) - error_loc("%s: redefinition error; original definition was at %s:%d\n", - type->name, type->loc_info.input_name, type->loc_info.line_number); - type->name = name; - type->namespace = namespace; - return type; -} - type_t *type_new_array(const char *name, const decl_spec_t *element, int declptr, unsigned int dim, expr_t *size_is, expr_t *length_is) { @@ -522,8 +511,21 @@ type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *i return coclass; }
-type_t *type_runtimeclass_define(type_t *runtimeclass, ifref_list_t *ifaces) +type_t *type_runtimeclass_declare(char *name, struct namespace *namespace) +{ + type_t *type = get_type(TYPE_RUNTIMECLASS, name, namespace, 0); + if (type_get_type_detect_alias(type) != TYPE_RUNTIMECLASS) + error_loc("runtimeclass %s previously not declared a runtimeclass at %s:%d\n", + type->name, type->loc_info.input_name, type->loc_info.line_number); + return type; +} + +type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref_list_t *ifaces) { + if (runtimeclass->defined) + error_loc("runtimeclass %s already defined at %s:%d\n", + runtimeclass->name, runtimeclass->loc_info.input_name, runtimeclass->loc_info.line_number); + runtimeclass->attrs = check_runtimeclass_attrs(runtimeclass->name, attrs); runtimeclass->details.runtimeclass.ifaces = ifaces; runtimeclass->defined = TRUE; if (!type_runtimeclass_get_default_iface(runtimeclass)) diff --git a/tools/widl/typetree.h b/tools/widl/typetree.h index 69d00dee49b..8a8e1c529ac 100644 --- a/tools/widl/typetree.h +++ b/tools/widl/typetree.h @@ -30,6 +30,7 @@ enum name_type { };
attr_list_t *check_coclass_attrs(const char *name, attr_list_t *attrs); +attr_list_t *check_runtimeclass_attrs(const char *name, attr_list_t *attrs);
type_t *type_new_function(var_list_t *args); type_t *type_new_pointer(type_t *ref); @@ -46,13 +47,13 @@ type_t *type_new_struct(char *name, struct namespace *namespace, int defined, va type_t *type_new_nonencapsulated_union(const char *name, int defined, var_list_t *fields); type_t *type_new_encapsulated_union(char *name, var_t *switch_field, var_t *union_field, var_list_t *cases); type_t *type_new_bitfield(type_t *field_type, const expr_t *bits); -type_t *type_new_runtimeclass(char *name, struct namespace *namespace); +type_t *type_runtimeclass_declare(char *name, struct namespace *namespace); void type_interface_define(type_t *iface, type_t *inherit, statement_list_t *stmts); void type_dispinterface_define(type_t *iface, var_list_t *props, var_list_t *methods); void type_dispinterface_define_from_iface(type_t *dispiface, type_t *iface); void type_module_define(type_t *module, statement_list_t *stmts); type_t *type_coclass_define(type_t *coclass, attr_list_t *attrs, ifref_list_t *ifaces); -type_t *type_runtimeclass_define(type_t *runtimeclass, ifref_list_t *ifaces); +type_t *type_runtimeclass_define(type_t *runtimeclass, attr_list_t *attrs, ifref_list_t *ifaces); int type_is_equal(const type_t *type1, const type_t *type2); const char *type_get_name(const type_t *type, enum name_type name_type); char *gen_name(void);
Signed-off-by: Jacek Caban jacek@codeweavers.com
Interface referencing should probably check for a previous type declaration, but Wine IDLs currently have many places where this is broken.
This is for instance the case when a coclass use the inner interface statement to declare an interface without any previous declaration.
And in mimeole.idl, coclass are being declared with the same name as their interface, to generate the corresponding CLSID.
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- tools/widl/parser.y | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-)
diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 5008a35f64f..1505e3e88a0 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -286,7 +286,8 @@ static typelib_t *current_typelib; %type <type_qualifier> type_qualifier m_type_qual_list %type <function_specifier> function_specifier %type <declspec> decl_spec decl_spec_no_type m_decl_spec_no_type -%type <type> inherit interface interfacedef interfacedec +%type <type> inherit interface interfacedef +%type <type> interfaceref %type <type> dispinterface dispinterfacehdr dispinterfacedef %type <type> module modulehdr moduledef %type <str> namespacedef @@ -356,7 +357,8 @@ m_acf: /* empty */ | aACF acf_statements gbl_statements: { $$ = NULL; } | gbl_statements namespacedef '{' { push_namespace($2); } gbl_statements '}' { pop_namespace($2); $$ = append_statements($1, $5); } - | gbl_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } + | gbl_statements interface ';' { $$ = append_statement($1, make_statement_reference($2)); } + | gbl_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference($2)); } | gbl_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } | gbl_statements coclass ';' { $$ = $1; reg_type($2, $2->name, current_namespace, 0); @@ -375,7 +377,8 @@ gbl_statements: { $$ = NULL; } ;
imp_statements: { $$ = NULL; } - | imp_statements interfacedec { $$ = append_statement($1, make_statement_reference($2)); } + | imp_statements interface ';' { $$ = append_statement($1, make_statement_reference($2)); } + | imp_statements dispinterface ';' { $$ = append_statement($1, make_statement_reference($2)); } | imp_statements namespacedef '{' { push_namespace($2); } imp_statements '}' { pop_namespace($2); $$ = append_statements($1, $5); } | imp_statements interfacedef { $$ = append_statement($1, make_statement_type_decl($2)); } @@ -928,7 +931,7 @@ class_interfaces: { $$ = NULL; } ;
class_interface: - m_attributes interfacedec { $$ = make_ifref($2); $$->attrs = $1; } + m_attributes interfaceref ';' { $$ = make_ifref($2); $$->attrs = $1; } ;
dispinterface: tDISPINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); } @@ -996,9 +999,11 @@ interfacedef: interfacehdr inherit | dispinterfacedef semicolon_opt { $$ = $1; } ;
-interfacedec: - interface ';' { $$ = $1; } - | dispinterface ';' { $$ = $1; } +interfaceref: + tINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); } + | tINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); } + | tDISPINTERFACE aIDENTIFIER { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); } + | tDISPINTERFACE aKNOWNTYPE { $$ = get_type(TYPE_INTERFACE, $2, current_namespace, 0); } ;
module: tMODULE aIDENTIFIER { $$ = type_new_module($2); }
Signed-off-by: Jacek Caban jacek@codeweavers.com