reactos/sdk/tools/widl/widltypes.h

620 lines
12 KiB
C
Raw Normal View History

/*
* IDL Compiler
*
* Copyright 2002 Ove Kaaven
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WIDL_WIDLTYPES_H
#define __WIDL_WIDLTYPES_H
#include <stdarg.h>
#include <assert.h>
#include "guiddef.h"
#include "ndrtypes.h"
#include "wine/list.h"
#ifndef UUID_DEFINED
#define UUID_DEFINED
typedef GUID UUID;
#endif
#define TRUE 1
#define FALSE 0
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for object methods. - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for non-object functions. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Make the attrs parameter passed to start_typelib const. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: The odl attribute is valid for dispinterfaces. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Output a warning if duplicate attributes are specified. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add support for the broadcast and idempotent operation attributes. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse. Add FIXMEs for the remaining ones and remove the warning for unimplemented attribute types since we now support all the attributes that we parse. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed. Add location information to variable automatically, since this is will be useful for type checking of arguments. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add checking to arguments of non-local functions. Check that out arguments have enough levels of indirection and that they don't derive from void * or a function pointer. - Rob Shearman <rob@codeweavers.com> Tue, 15 Apr 2008 widl: Change alls calls to error in the parser to error_loc so that line number information is printed. svn path=/trunk/; revision=37260
2008-11-09 14:21:53 +00:00
typedef struct _loc_info_t loc_info_t;
typedef struct _attr_t attr_t;
typedef struct _expr_t expr_t;
typedef struct _type_t type_t;
typedef struct _var_t var_t;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
typedef struct _declarator_t declarator_t;
typedef struct _ifref_t ifref_t;
typedef struct _typelib_entry_t typelib_entry_t;
typedef struct _importlib_t importlib_t;
typedef struct _importinfo_t importinfo_t;
typedef struct _typelib_t typelib_t;
typedef struct _user_type_t user_type_t;
typedef struct _user_type_t context_handle_t;
typedef struct _user_type_t generic_handle_t;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
typedef struct _type_list_t type_list_t;
typedef struct _statement_t statement_t;
typedef struct _warning_t warning_t;
typedef struct list attr_list_t;
typedef struct list str_list_t;
typedef struct list expr_list_t;
typedef struct list var_list_t;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
typedef struct list declarator_list_t;
typedef struct list ifref_list_t;
typedef struct list user_type_list_t;
typedef struct list context_handle_list_t;
typedef struct list generic_handle_list_t;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
typedef struct list statement_list_t;
typedef struct list warning_list_t;
enum attr_type
{
ATTR_AGGREGATABLE,
ATTR_ALLOCATE,
ATTR_ANNOTATION,
ATTR_APPOBJECT,
ATTR_ASYNC,
ATTR_ASYNCUUID,
ATTR_AUTO_HANDLE,
ATTR_BINDABLE,
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for object methods. - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for non-object functions. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Make the attrs parameter passed to start_typelib const. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: The odl attribute is valid for dispinterfaces. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Output a warning if duplicate attributes are specified. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add support for the broadcast and idempotent operation attributes. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse. Add FIXMEs for the remaining ones and remove the warning for unimplemented attribute types since we now support all the attributes that we parse. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed. Add location information to variable automatically, since this is will be useful for type checking of arguments. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add checking to arguments of non-local functions. Check that out arguments have enough levels of indirection and that they don't derive from void * or a function pointer. - Rob Shearman <rob@codeweavers.com> Tue, 15 Apr 2008 widl: Change alls calls to error in the parser to error_loc so that line number information is printed. svn path=/trunk/; revision=37260
2008-11-09 14:21:53 +00:00
ATTR_BROADCAST,
ATTR_CALLAS,
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
ATTR_CALLCONV, /* calling convention pseudo-attribute */
ATTR_CASE,
ATTR_CODE,
ATTR_COMMSTATUS,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
ATTR_CONST, /* const pseudo-attribute */
ATTR_CONTEXTHANDLE,
ATTR_CONTROL,
ATTR_DECODE,
ATTR_DEFAULT,
ATTR_DEFAULTBIND,
ATTR_DEFAULTCOLLELEM,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
ATTR_DEFAULTVALUE,
ATTR_DEFAULTVTABLE,
ATTR_DISABLECONSISTENCYCHECK,
ATTR_DISPINTERFACE,
ATTR_DISPLAYBIND,
ATTR_DLLNAME,
ATTR_DUAL,
ATTR_ENABLEALLOCATE,
ATTR_ENCODE,
ATTR_ENDPOINT,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
ATTR_ENTRY,
ATTR_EXPLICIT_HANDLE,
ATTR_FAULTSTATUS,
ATTR_FORCEALLOCATE,
ATTR_HANDLE,
ATTR_HELPCONTEXT,
ATTR_HELPFILE,
ATTR_HELPSTRING,
ATTR_HELPSTRINGCONTEXT,
ATTR_HELPSTRINGDLL,
ATTR_HIDDEN,
ATTR_ID,
ATTR_IDEMPOTENT,
ATTR_IGNORE,
ATTR_IIDIS,
ATTR_IMMEDIATEBIND,
ATTR_IMPLICIT_HANDLE,
ATTR_IN,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
ATTR_INLINE,
ATTR_INPUTSYNC,
ATTR_LENGTHIS,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
ATTR_LIBLCID,
ATTR_LICENSED,
ATTR_LOCAL,
ATTR_MAYBE,
ATTR_MESSAGE,
ATTR_NOCODE,
ATTR_NONBROWSABLE,
ATTR_NONCREATABLE,
ATTR_NONEXTENSIBLE,
ATTR_NOTIFY,
ATTR_NOTIFYFLAG,
ATTR_OBJECT,
ATTR_ODL,
ATTR_OLEAUTOMATION,
ATTR_OPTIMIZE,
ATTR_OPTIONAL,
ATTR_OUT,
ATTR_PARAMLCID,
ATTR_PARTIALIGNORE,
ATTR_POINTERDEFAULT,
ATTR_POINTERTYPE,
ATTR_PROGID,
ATTR_PROPGET,
ATTR_PROPPUT,
ATTR_PROPPUTREF,
ATTR_PROXY,
ATTR_PUBLIC,
ATTR_RANGE,
ATTR_READONLY,
ATTR_REPRESENTAS,
ATTR_REQUESTEDIT,
ATTR_RESTRICTED,
ATTR_RETVAL,
ATTR_SIZEIS,
ATTR_SOURCE,
ATTR_STRICTCONTEXTHANDLE,
ATTR_STRING,
ATTR_SWITCHIS,
ATTR_SWITCHTYPE,
ATTR_THREADING,
ATTR_TRANSMITAS,
ATTR_UIDEFAULT,
ATTR_USERMARSHAL,
ATTR_USESGETLASTERROR,
ATTR_UUID,
ATTR_V1ENUM,
ATTR_VARARG,
ATTR_VERSION,
ATTR_VIPROGID,
ATTR_WIREMARSHAL
};
enum expr_type
{
EXPR_VOID,
EXPR_NUM,
EXPR_HEXNUM,
EXPR_DOUBLE,
EXPR_IDENTIFIER,
EXPR_NEG,
EXPR_NOT,
EXPR_PPTR,
EXPR_CAST,
EXPR_SIZEOF,
EXPR_SHL,
EXPR_SHR,
EXPR_MUL,
EXPR_DIV,
EXPR_ADD,
EXPR_SUB,
EXPR_AND,
EXPR_OR,
EXPR_COND,
EXPR_TRUEFALSE,
EXPR_ADDRESSOF,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
EXPR_MEMBER,
EXPR_ARRAY,
EXPR_MOD,
EXPR_LOGOR,
EXPR_LOGAND,
EXPR_XOR,
EXPR_EQUALITY,
EXPR_INEQUALITY,
EXPR_GTR,
EXPR_LESS,
EXPR_GTREQL,
EXPR_LESSEQL,
EXPR_LOGNOT,
EXPR_POS,
EXPR_STRLIT,
EXPR_WSTRLIT,
EXPR_CHARCONST,
};
enum type_kind
{
TKIND_PRIMITIVE = -1,
TKIND_ENUM,
TKIND_RECORD,
TKIND_MODULE,
TKIND_INTERFACE,
TKIND_DISPATCH,
TKIND_COCLASS,
TKIND_ALIAS,
TKIND_UNION,
TKIND_MAX
};
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
enum storage_class
{
STG_NONE,
STG_STATIC,
STG_EXTERN,
STG_REGISTER,
};
enum statement_type
{
STMT_LIBRARY,
STMT_DECLARATION,
STMT_TYPE,
STMT_TYPEREF,
STMT_MODULE,
STMT_TYPEDEF,
STMT_IMPORT,
STMT_IMPORTLIB,
STMT_PRAGMA,
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
STMT_CPPQUOTE
};
enum threading_type
{
THREADING_APARTMENT = 1,
THREADING_NEUTRAL,
THREADING_SINGLE,
THREADING_FREE,
THREADING_BOTH
};
enum type_basic_type
{
TYPE_BASIC_INT8 = 1,
TYPE_BASIC_INT16,
TYPE_BASIC_INT32,
TYPE_BASIC_INT64,
TYPE_BASIC_INT,
TYPE_BASIC_INT3264,
TYPE_BASIC_LONG,
TYPE_BASIC_CHAR,
TYPE_BASIC_HYPER,
TYPE_BASIC_BYTE,
TYPE_BASIC_WCHAR,
TYPE_BASIC_FLOAT,
TYPE_BASIC_DOUBLE,
TYPE_BASIC_ERROR_STATUS_T,
TYPE_BASIC_HANDLE,
};
#define TYPE_BASIC_MAX TYPE_BASIC_HANDLE
#define TYPE_BASIC_INT_MIN TYPE_BASIC_INT8
#define TYPE_BASIC_INT_MAX TYPE_BASIC_HYPER
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for object methods. - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for non-object functions. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Make the attrs parameter passed to start_typelib const. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: The odl attribute is valid for dispinterfaces. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Output a warning if duplicate attributes are specified. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add support for the broadcast and idempotent operation attributes. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse. Add FIXMEs for the remaining ones and remove the warning for unimplemented attribute types since we now support all the attributes that we parse. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed. Add location information to variable automatically, since this is will be useful for type checking of arguments. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add checking to arguments of non-local functions. Check that out arguments have enough levels of indirection and that they don't derive from void * or a function pointer. - Rob Shearman <rob@codeweavers.com> Tue, 15 Apr 2008 widl: Change alls calls to error in the parser to error_loc so that line number information is printed. svn path=/trunk/; revision=37260
2008-11-09 14:21:53 +00:00
struct _loc_info_t
{
const char *input_name;
int line_number;
const char *near_text;
};
struct str_list_entry_t
{
char *str;
struct list entry;
};
struct _attr_t {
enum attr_type type;
union {
unsigned int ival;
void *pval;
} u;
/* parser-internal */
struct list entry;
};
struct _expr_t {
enum expr_type type;
const expr_t *ref;
union {
int lval;
double dval;
const char *sval;
const expr_t *ext;
type_t *tref;
} u;
const expr_t *ext2;
int is_const;
int cval;
/* parser-internal */
struct list entry;
};
struct struct_details
{
var_list_t *fields;
};
struct enumeration_details
{
var_list_t *enums;
};
struct func_details
{
var_list_t *args;
struct _var_t *retval;
int idx;
};
struct iface_details
{
statement_list_t *stmts;
var_list_t *disp_methods;
var_list_t *disp_props;
struct _type_t *inherit;
struct _type_t *disp_inherit;
struct _type_t *async_iface;
};
struct module_details
{
statement_list_t *stmts;
};
struct array_details
{
expr_t *size_is;
expr_t *length_is;
struct _type_t *elem;
unsigned int dim;
unsigned char ptr_def_fc;
unsigned char declptr; /* if declared as a pointer */
unsigned short ptr_tfsoff; /* offset of pointer definition for declptr */
};
struct coclass_details
{
ifref_list_t *ifaces;
};
struct basic_details
{
enum type_basic_type type;
int sign;
};
struct pointer_details
{
struct _type_t *ref;
unsigned char def_fc;
};
struct bitfield_details
{
struct _type_t *field;
const expr_t *bits;
};
#define HASHMAX 64
struct namespace {
const char *name;
struct namespace *parent;
struct list entry;
struct list children;
struct rtype *type_hash[HASHMAX];
};
enum type_type
{
TYPE_VOID,
TYPE_BASIC, /* ints, floats and handles */
TYPE_ENUM,
TYPE_STRUCT,
TYPE_ENCAPSULATED_UNION,
TYPE_UNION,
TYPE_ALIAS,
TYPE_MODULE,
TYPE_COCLASS,
TYPE_FUNCTION,
TYPE_INTERFACE,
TYPE_POINTER,
TYPE_ARRAY,
TYPE_BITFIELD,
};
struct _type_t {
const char *name;
struct namespace *namespace;
enum type_type type_type;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
attr_list_t *attrs;
union
{
struct struct_details *structure;
struct enumeration_details *enumeration;
struct func_details *function;
struct iface_details *iface;
struct module_details *module;
struct array_details array;
struct coclass_details coclass;
struct basic_details basic;
struct pointer_details pointer;
struct bitfield_details bitfield;
} details;
const char *c_name;
type_t *orig; /* dup'd types */
unsigned int typestring_offset;
unsigned int ptrdesc; /* used for complex structs */
int typelib_idx;
loc_info_t loc_info;
unsigned int ignore : 1;
unsigned int defined : 1;
unsigned int written : 1;
unsigned int user_types_registered : 1;
unsigned int tfswrite : 1; /* if the type needs to be written to the TFS */
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
unsigned int checked : 1;
unsigned int is_alias : 1; /* is the type an alias? */
};
struct _var_t {
char *name;
type_t *type;
attr_list_t *attrs;
expr_t *eval;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
enum storage_class stgclass;
unsigned int procstring_offset;
unsigned int typestring_offset;
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for object methods. - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for non-object functions. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Make the attrs parameter passed to start_typelib const. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: The odl attribute is valid for dispinterfaces. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Output a warning if duplicate attributes are specified. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add support for the broadcast and idempotent operation attributes. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse. Add FIXMEs for the remaining ones and remove the warning for unimplemented attribute types since we now support all the attributes that we parse. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed. Add location information to variable automatically, since this is will be useful for type checking of arguments. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add checking to arguments of non-local functions. Check that out arguments have enough levels of indirection and that they don't derive from void * or a function pointer. - Rob Shearman <rob@codeweavers.com> Tue, 15 Apr 2008 widl: Change alls calls to error in the parser to error_loc so that line number information is printed. svn path=/trunk/; revision=37260
2008-11-09 14:21:53 +00:00
struct _loc_info_t loc_info;
/* parser-internal */
struct list entry;
};
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
struct _declarator_t {
var_t *var;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
type_t *type;
type_t *func_type;
expr_t *bits;
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
/* parser-internal */
struct list entry;
};
struct _ifref_t {
type_t *iface;
attr_list_t *attrs;
/* parser-internal */
struct list entry;
};
struct _typelib_entry_t {
type_t *type;
struct list entry;
};
struct _importinfo_t {
int offset;
GUID guid;
int flags;
int id;
char *name;
importlib_t *importlib;
};
struct _importlib_t {
char *name;
int version;
GUID guid;
importinfo_t *importinfos;
int ntypeinfos;
int allocated;
struct list entry;
};
struct _typelib_t {
char *name;
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for object methods. - Rob Shearman <rob@codeweavers.com> Fri, 11 Apr 2008 widl: Support non-default calling conventions for non-object functions. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Make the attrs parameter passed to start_typelib const. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: The odl attribute is valid for dispinterfaces. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Output a warning if duplicate attributes are specified. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add support for the broadcast and idempotent operation attributes. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse. Add FIXMEs for the remaining ones and remove the warning for unimplemented attribute types since we now support all the attributes that we parse. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed. Add location information to variable automatically, since this is will be useful for type checking of arguments. - Rob Shearman <rob@codeweavers.com> Mon, 14 Apr 2008 widl: Add checking to arguments of non-local functions. Check that out arguments have enough levels of indirection and that they don't derive from void * or a function pointer. - Rob Shearman <rob@codeweavers.com> Tue, 15 Apr 2008 widl: Change alls calls to error in the parser to error_loc so that line number information is printed. svn path=/trunk/; revision=37260
2008-11-09 14:21:53 +00:00
const attr_list_t *attrs;
struct list importlibs;
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
statement_list_t *stmts;
};
struct _user_type_t {
struct list entry;
const char *name;
};
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
struct _type_list_t {
type_t *type;
struct _type_list_t *next;
};
struct _statement_t {
struct list entry;
enum statement_type type;
union
{
ifref_t iface;
type_t *type;
const char *str;
var_t *var;
typelib_t *lib;
type_list_t *type_list;
} u;
};
struct _warning_t {
int num;
struct list entry;
};
typedef enum {
SYS_WIN16,
SYS_WIN32,
SYS_MAC,
SYS_WIN64
} syskind_t;
extern user_type_list_t user_type_list;
extern context_handle_list_t context_handle_list;
extern generic_handle_list_t generic_handle_list;
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
void check_for_additional_prototype_types(const var_list_t *list);
void init_types(void);
type_t *alloc_type(void);
void set_all_tfswrite(int val);
void clear_all_offsets(void);
#define tsENUM 1
#define tsSTRUCT 2
#define tsUNION 3
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
var_t *find_const(const char *name, int f);
type_t *find_type(const char *name, struct namespace *namespace, int t);
type_t *make_type(enum type_type type);
type_t *get_type(enum type_type type, char *name, struct namespace *namespace, int t);
type_t *reg_type(type_t *type, const char *name, struct namespace *namespace, int t);
void add_incomplete(type_t *t);
var_t *make_var(char *name);
var_list_t *append_var(var_list_t *list, var_t *var);
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
void init_loc_info(loc_info_t *);
char *format_namespace(struct namespace *namespace, const char *prefix, const char *separator, const char *suffix);
static inline var_list_t *type_get_function_args(const type_t *func_type)
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
{
return func_type->details.function->args;
}
static inline enum type_type type_get_type_detect_alias(const type_t *type)
{
if (type->is_alias)
return TYPE_ALIAS;
return type->type_type;
}
#define STATEMENTS_FOR_EACH_FUNC(stmt, stmts) \
if (stmts) LIST_FOR_EACH_ENTRY( stmt, stmts, statement_t, entry ) \
if (stmt->type == STMT_DECLARATION && stmt->u.var->stgclass == STG_NONE && \
type_get_type_detect_alias(stmt->u.var->type) == TYPE_FUNCTION)
static inline int statements_has_func(const statement_list_t *stmts)
{
const statement_t *stmt;
int has_func = 0;
STATEMENTS_FOR_EACH_FUNC(stmt, stmts)
{
has_func = 1;
break;
}
return has_func;
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
}
static inline int is_global_namespace(const struct namespace *namespace)
{
return !namespace->name;
}
#endif