2006-07-30 12:58:24 +00:00
|
|
|
/* -*-C-*-
|
2005-02-20 15:02:48 +00:00
|
|
|
* 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
|
2006-07-30 12:58:24 +00:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
2005-02-20 15:02:48 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
%option stack
|
2008-12-04 19:52:55 +00:00
|
|
|
%option noinput nounput noyy_top_state
|
2008-01-11 13:46:33 +00:00
|
|
|
%option 8bit never-interactive prefix="parser_"
|
2005-02-20 15:02:48 +00:00
|
|
|
|
|
|
|
nl \r?\n
|
|
|
|
ws [ \f\t\r]
|
|
|
|
cident [a-zA-Z_][0-9a-zA-Z_]*
|
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
|
|
|
u_suffix (u|U)
|
|
|
|
l_suffix (l|L)
|
|
|
|
int [0-9]+({l_suffix}?{u_suffix}?|{u_suffix}?{l_suffix}?)?
|
2005-02-20 15:02:48 +00:00
|
|
|
hexd [0-9a-fA-F]
|
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
|
|
|
hex 0(x|X){hexd}+({l_suffix}?{u_suffix}?|{u_suffix}?{l_suffix}?)?
|
2005-02-20 15:02:48 +00:00
|
|
|
uuid {hexd}{8}-{hexd}{4}-{hexd}{4}-{hexd}{4}-{hexd}{12}
|
2008-01-11 13:46:33 +00:00
|
|
|
double [0-9]+\.[0-9]+([eE][+-]?[0-9]+)*
|
2005-02-20 15:02:48 +00:00
|
|
|
|
|
|
|
%x QUOTE
|
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
|
|
|
%x WSTRQUOTE
|
2008-01-11 13:46:33 +00:00
|
|
|
%x ATTR
|
|
|
|
%x PP_LINE
|
2014-04-18 20:22:07 +00:00
|
|
|
%x PP_PRAGMA
|
2010-03-04 13:46:14 +00:00
|
|
|
%x SQUOTE
|
2005-02-20 15:02:48 +00:00
|
|
|
|
|
|
|
%{
|
|
|
|
|
|
|
|
#include "config.h"
|
2010-07-04 19:52:38 +00:00
|
|
|
#include "wine/port.h"
|
2005-02-20 15:02:48 +00:00
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <assert.h>
|
2009-01-15 17:52:35 +00:00
|
|
|
#include <errno.h>
|
|
|
|
#include <limits.h>
|
2008-09-21 21:18:42 +00:00
|
|
|
|
2005-02-20 15:02:48 +00:00
|
|
|
#ifdef HAVE_UNISTD_H
|
2008-09-21 21:18:42 +00:00
|
|
|
#include <unistd.h>
|
|
|
|
#else
|
|
|
|
#define YY_NO_UNISTD_H
|
2005-02-20 15:02:48 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include "widl.h"
|
|
|
|
#include "utils.h"
|
|
|
|
#include "parser.h"
|
|
|
|
#include "wine/wpp.h"
|
|
|
|
|
2006-07-30 12:58:24 +00:00
|
|
|
#include "parser.tab.h"
|
2005-02-20 15:02:48 +00:00
|
|
|
|
|
|
|
static void addcchar(char c);
|
|
|
|
static char *get_buffered_cstring(void);
|
|
|
|
|
|
|
|
static char *cbuffer;
|
|
|
|
static int cbufidx;
|
|
|
|
static int cbufalloc = 0;
|
|
|
|
|
|
|
|
static int kw_token(const char *kw);
|
2008-01-11 13:46:33 +00:00
|
|
|
static int attr_token(const char *kw);
|
2005-02-20 15:02:48 +00:00
|
|
|
|
2019-01-29 12:18:09 +00:00
|
|
|
static void switch_to_acf(void);
|
|
|
|
|
2016-07-03 11:16:23 +00:00
|
|
|
static warning_list_t *disabled_warnings = NULL;
|
|
|
|
|
2018-04-11 11:29:04 +00:00
|
|
|
#define MAX_IMPORT_DEPTH 20
|
2005-02-20 15:02:48 +00:00
|
|
|
struct {
|
|
|
|
YY_BUFFER_STATE state;
|
|
|
|
char *input_name;
|
|
|
|
int line_number;
|
|
|
|
char *temp_name;
|
|
|
|
} import_stack[MAX_IMPORT_DEPTH];
|
|
|
|
int import_stack_ptr = 0;
|
|
|
|
|
2009-01-15 17:52:35 +00:00
|
|
|
/* converts an integer in string form to an unsigned long and prints an error
|
|
|
|
* on overflow */
|
2010-07-04 19:52:38 +00:00
|
|
|
static unsigned int xstrtoul(const char *nptr, char **endptr, int base)
|
2009-01-15 17:52:35 +00:00
|
|
|
{
|
2010-07-04 19:52:38 +00:00
|
|
|
unsigned long val;
|
2009-01-15 17:52:35 +00:00
|
|
|
|
|
|
|
errno = 0;
|
2010-07-04 19:52:38 +00:00
|
|
|
val = strtoul(nptr, endptr, base);
|
|
|
|
if ((val == ULONG_MAX && errno == ERANGE) || ((unsigned int)val != val))
|
2009-01-15 17:52:35 +00:00
|
|
|
error_loc("integer constant %s is too large\n", nptr);
|
2010-07-04 19:52:38 +00:00
|
|
|
return val;
|
2009-01-15 17:52:35 +00:00
|
|
|
}
|
|
|
|
|
2008-01-11 13:46:33 +00:00
|
|
|
UUID *parse_uuid(const char *u)
|
2005-02-20 15:02:48 +00:00
|
|
|
{
|
|
|
|
UUID* uuid = xmalloc(sizeof(UUID));
|
|
|
|
char b[3];
|
|
|
|
/* it would be nice to use UuidFromStringA */
|
|
|
|
uuid->Data1 = strtoul(u, NULL, 16);
|
|
|
|
uuid->Data2 = strtoul(u+9, NULL, 16);
|
|
|
|
uuid->Data3 = strtoul(u+14, NULL, 16);
|
|
|
|
b[2] = 0;
|
|
|
|
memcpy(b, u+19, 2); uuid->Data4[0] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+21, 2); uuid->Data4[1] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+24, 2); uuid->Data4[2] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+26, 2); uuid->Data4[3] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+28, 2); uuid->Data4[4] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+30, 2); uuid->Data4[5] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+32, 2); uuid->Data4[6] = strtoul(b, NULL, 16);
|
|
|
|
memcpy(b, u+34, 2); uuid->Data4[7] = strtoul(b, NULL, 16);
|
|
|
|
return uuid;
|
|
|
|
}
|
|
|
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
/*
|
|
|
|
**************************************************************************
|
|
|
|
* The flexer starts here
|
|
|
|
**************************************************************************
|
|
|
|
*/
|
|
|
|
%%
|
2014-04-18 20:22:07 +00:00
|
|
|
<INITIAL>^{ws}*\#{ws}*pragma{ws}+ yy_push_state(PP_PRAGMA);
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>^{ws}*\#{ws}* yy_push_state(PP_LINE);
|
|
|
|
<PP_LINE>[^\n]* {
|
2005-02-20 15:02:48 +00:00
|
|
|
int lineno;
|
|
|
|
char *cptr, *fname;
|
|
|
|
yy_pop_state();
|
|
|
|
lineno = (int)strtol(yytext, &cptr, 10);
|
|
|
|
if(!lineno)
|
2008-01-11 13:46:33 +00:00
|
|
|
error_loc("Malformed '#...' line-directive; invalid linenumber\n");
|
2005-02-20 15:02:48 +00:00
|
|
|
fname = strchr(cptr, '"');
|
|
|
|
if(!fname)
|
2008-01-11 13:46:33 +00:00
|
|
|
error_loc("Malformed '#...' line-directive; missing filename\n");
|
2005-02-20 15:02:48 +00:00
|
|
|
fname++;
|
|
|
|
cptr = strchr(fname, '"');
|
|
|
|
if(!cptr)
|
2008-01-11 13:46:33 +00:00
|
|
|
error_loc("Malformed '#...' line-directive; missing terminating \"\n");
|
2005-02-20 15:02:48 +00:00
|
|
|
*cptr = '\0';
|
|
|
|
line_number = lineno - 1; /* We didn't read the newline */
|
|
|
|
input_name = xstrdup(fname);
|
|
|
|
}
|
2014-04-18 20:22:07 +00:00
|
|
|
<PP_PRAGMA>midl_echo[^\n]* yyless(9); yy_pop_state(); return tCPPQUOTE;
|
2015-11-16 21:45:45 +00:00
|
|
|
<PP_PRAGMA>winrt[^\n]* {
|
|
|
|
if(import_stack_ptr) {
|
|
|
|
if(!winrt_mode)
|
|
|
|
error_loc("winrt IDL file imported in non-winrt mode\n");
|
|
|
|
}else {
|
|
|
|
const char *ptr = yytext+5;
|
|
|
|
|
|
|
|
winrt_mode = TRUE;
|
|
|
|
|
|
|
|
while(isspace(*ptr))
|
|
|
|
ptr++;
|
|
|
|
if(!strncmp(ptr, "ns_prefix", 9) && (!*(ptr += 9) || isspace(*ptr)))
|
|
|
|
use_abi_namespace = TRUE;
|
|
|
|
}
|
|
|
|
yy_pop_state();
|
|
|
|
}
|
2014-04-18 20:22:07 +00:00
|
|
|
<PP_PRAGMA>[^\n]* parser_lval.str = xstrdup(yytext); yy_pop_state(); return aPRAGMA;
|
2016-07-03 11:16:23 +00:00
|
|
|
<INITIAL>^{ws}*midl_pragma{ws}+warning return tPRAGMA_WARNING;
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>\" yy_push_state(QUOTE); cbufidx = 0;
|
2005-02-20 15:02:48 +00:00
|
|
|
<QUOTE>\" {
|
|
|
|
yy_pop_state();
|
2008-01-11 13:46:33 +00:00
|
|
|
parser_lval.str = get_buffered_cstring();
|
2005-02-20 15:02:48 +00:00
|
|
|
return aSTRING;
|
|
|
|
}
|
2010-07-04 19:52:38 +00:00
|
|
|
<INITIAL,ATTR>L\" yy_push_state(WSTRQUOTE); cbufidx = 0;
|
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
|
|
|
<WSTRQUOTE>\" {
|
|
|
|
yy_pop_state();
|
|
|
|
parser_lval.str = get_buffered_cstring();
|
|
|
|
return aWSTRING;
|
|
|
|
}
|
2010-03-04 13:46:14 +00:00
|
|
|
<INITIAL,ATTR>\' yy_push_state(SQUOTE); cbufidx = 0;
|
|
|
|
<SQUOTE>\' {
|
|
|
|
yy_pop_state();
|
|
|
|
parser_lval.str = get_buffered_cstring();
|
|
|
|
return aSQSTRING;
|
|
|
|
}
|
|
|
|
<QUOTE,WSTRQUOTE,SQUOTE>\\\\ |
|
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
|
|
|
<QUOTE,WSTRQUOTE>\\\" addcchar(yytext[1]);
|
2010-03-04 13:46:14 +00:00
|
|
|
<SQUOTE>\\\' addcchar(yytext[1]);
|
|
|
|
<QUOTE,WSTRQUOTE,SQUOTE>\\. addcchar('\\'); addcchar(yytext[1]);
|
|
|
|
<QUOTE,WSTRQUOTE,SQUOTE>. addcchar(yytext[0]);
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>\[ yy_push_state(ATTR); return '[';
|
|
|
|
<ATTR>\] yy_pop_state(); return ']';
|
|
|
|
<ATTR>{cident} return attr_token(yytext);
|
|
|
|
<ATTR>{uuid} {
|
|
|
|
parser_lval.uuid = parse_uuid(yytext);
|
2005-02-20 15:02:48 +00:00
|
|
|
return aUUID;
|
|
|
|
}
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>{hex} {
|
2009-01-15 17:52:35 +00:00
|
|
|
parser_lval.num = xstrtoul(yytext, NULL, 0);
|
2005-02-20 15:02:48 +00:00
|
|
|
return aHEXNUM;
|
|
|
|
}
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>{int} {
|
2009-01-15 17:52:35 +00:00
|
|
|
parser_lval.num = xstrtoul(yytext, NULL, 0);
|
2005-02-20 15:02:48 +00:00
|
|
|
return aNUM;
|
|
|
|
}
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL>{double} {
|
|
|
|
parser_lval.dbl = strtod(yytext, NULL);
|
|
|
|
return aDOUBLE;
|
|
|
|
}
|
2006-07-30 12:58:24 +00:00
|
|
|
SAFEARRAY{ws}*/\( return tSAFEARRAY;
|
2005-02-20 15:02:48 +00:00
|
|
|
{cident} return kw_token(yytext);
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>\n line_number++;
|
|
|
|
<INITIAL,ATTR>{ws}
|
|
|
|
<INITIAL,ATTR>\<\< return SHL;
|
|
|
|
<INITIAL,ATTR>\>\> return SHR;
|
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
|
|
|
<INITIAL,ATTR>\-\> return MEMBERPTR;
|
|
|
|
<INITIAL,ATTR>== return EQUALITY;
|
|
|
|
<INITIAL,ATTR>!= return INEQUALITY;
|
|
|
|
<INITIAL,ATTR>\>= return GREATEREQUAL;
|
|
|
|
<INITIAL,ATTR>\<= return LESSEQUAL;
|
|
|
|
<INITIAL,ATTR>\|\| return LOGICALOR;
|
|
|
|
<INITIAL,ATTR>&& return LOGICALAND;
|
2009-11-24 22:42:40 +00:00
|
|
|
<INITIAL,ATTR>\.\.\. return ELLIPSIS;
|
2008-01-11 13:46:33 +00:00
|
|
|
<INITIAL,ATTR>. return yytext[0];
|
2005-02-20 15:02:48 +00:00
|
|
|
<<EOF>> {
|
2019-01-29 12:18:09 +00:00
|
|
|
if (import_stack_ptr)
|
|
|
|
return aEOF;
|
|
|
|
if (acf_name)
|
|
|
|
{
|
|
|
|
switch_to_acf();
|
|
|
|
return aACF;
|
|
|
|
}
|
|
|
|
yyterminate();
|
2005-02-20 15:02:48 +00:00
|
|
|
}
|
|
|
|
%%
|
|
|
|
|
2008-01-11 13:46:33 +00:00
|
|
|
#ifndef parser_wrap
|
|
|
|
int parser_wrap(void)
|
2005-02-20 15:02:48 +00:00
|
|
|
{
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2008-01-11 13:46:33 +00:00
|
|
|
struct keyword {
|
2005-02-20 15:02:48 +00:00
|
|
|
const char *kw;
|
|
|
|
int token;
|
2008-01-11 13:46:33 +00:00
|
|
|
};
|
|
|
|
|
2008-11-15 20:18:16 +00:00
|
|
|
/* This table MUST be alphabetically sorted on the kw field */
|
2008-01-11 13:46:33 +00:00
|
|
|
static const struct keyword keywords[] = {
|
2006-07-30 12:58:24 +00:00
|
|
|
{"FALSE", tFALSE},
|
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
|
|
|
{"NULL", tNULL},
|
2006-07-30 12:58:24 +00:00
|
|
|
{"TRUE", tTRUE},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"__cdecl", tCDECL},
|
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
|
|
|
{"__fastcall", tFASTCALL},
|
2019-01-29 12:18:09 +00:00
|
|
|
{"__int32", tINT32},
|
2009-11-24 22:42:40 +00:00
|
|
|
{"__int3264", tINT3264},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"__int64", tINT64},
|
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
|
|
|
{"__pascal", tPASCAL},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"__stdcall", tSTDCALL},
|
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
|
|
|
{"_cdecl", tCDECL},
|
|
|
|
{"_fastcall", tFASTCALL},
|
|
|
|
{"_pascal", tPASCAL},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"_stdcall", tSTDCALL},
|
|
|
|
{"boolean", tBOOLEAN},
|
|
|
|
{"byte", tBYTE},
|
|
|
|
{"case", tCASE},
|
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
|
|
|
{"cdecl", tCDECL},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"char", tCHAR},
|
|
|
|
{"coclass", tCOCLASS},
|
|
|
|
{"const", tCONST},
|
|
|
|
{"cpp_quote", tCPPQUOTE},
|
|
|
|
{"default", tDEFAULT},
|
|
|
|
{"dispinterface", tDISPINTERFACE},
|
|
|
|
{"double", tDOUBLE},
|
|
|
|
{"enum", tENUM},
|
|
|
|
{"error_status_t", tERRORSTATUST},
|
|
|
|
{"extern", tEXTERN},
|
|
|
|
{"float", tFLOAT},
|
|
|
|
{"handle_t", tHANDLET},
|
|
|
|
{"hyper", tHYPER},
|
|
|
|
{"import", tIMPORT},
|
|
|
|
{"importlib", tIMPORTLIB},
|
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
|
|
|
{"inline", tINLINE},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"int", tINT},
|
|
|
|
{"interface", tINTERFACE},
|
|
|
|
{"library", tLIBRARY},
|
|
|
|
{"long", tLONG},
|
|
|
|
{"methods", tMETHODS},
|
|
|
|
{"module", tMODULE},
|
2014-04-18 20:22:07 +00:00
|
|
|
{"namespace", tNAMESPACE},
|
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
|
|
|
{"pascal", tPASCAL},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"properties", tPROPERTIES},
|
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
|
|
|
{"register", tREGISTER},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"short", tSHORT},
|
|
|
|
{"signed", tSIGNED},
|
|
|
|
{"sizeof", tSIZEOF},
|
2009-01-15 17:52:35 +00:00
|
|
|
{"small", tSMALL},
|
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
|
|
|
{"static", tSTATIC},
|
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
|
|
|
{"stdcall", tSTDCALL},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"struct", tSTRUCT},
|
|
|
|
{"switch", tSWITCH},
|
|
|
|
{"typedef", tTYPEDEF},
|
2005-04-03 12:49:25 +00:00
|
|
|
{"union", tUNION},
|
2005-02-20 15:02:48 +00:00
|
|
|
{"unsigned", tUNSIGNED},
|
|
|
|
{"void", tVOID},
|
|
|
|
{"wchar_t", tWCHAR},
|
|
|
|
};
|
|
|
|
#define NKEYWORDS (sizeof(keywords)/sizeof(keywords[0]))
|
2008-01-11 13:46:33 +00:00
|
|
|
|
2008-11-15 20:18:16 +00:00
|
|
|
/* keywords only recognized in attribute lists
|
|
|
|
* This table MUST be alphabetically sorted on the kw field
|
|
|
|
*/
|
2008-01-11 13:46:33 +00:00
|
|
|
static const struct keyword attr_keywords[] =
|
|
|
|
{
|
|
|
|
{"aggregatable", tAGGREGATABLE},
|
|
|
|
{"allocate", tALLOCATE},
|
2009-11-24 22:42:40 +00:00
|
|
|
{"annotation", tANNOTATION},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"apartment", tAPARTMENT},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"appobject", tAPPOBJECT},
|
|
|
|
{"async", tASYNC},
|
|
|
|
{"async_uuid", tASYNCUUID},
|
|
|
|
{"auto_handle", tAUTOHANDLE},
|
|
|
|
{"bindable", tBINDABLE},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"both", tBOTH},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"broadcast", tBROADCAST},
|
|
|
|
{"byte_count", tBYTECOUNT},
|
|
|
|
{"call_as", tCALLAS},
|
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
|
|
|
{"callback", tCALLBACK},
|
|
|
|
{"code", tCODE},
|
|
|
|
{"comm_status", tCOMMSTATUS},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"context_handle", tCONTEXTHANDLE},
|
|
|
|
{"context_handle_noserialize", tCONTEXTHANDLENOSERIALIZE},
|
|
|
|
{"context_handle_serialize", tCONTEXTHANDLENOSERIALIZE},
|
|
|
|
{"control", tCONTROL},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"decode", tDECODE},
|
|
|
|
{"defaultbind", tDEFAULTBIND},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"defaultcollelem", tDEFAULTCOLLELEM},
|
|
|
|
{"defaultvalue", tDEFAULTVALUE},
|
|
|
|
{"defaultvtable", tDEFAULTVTABLE},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"disable_consistency_check", tDISABLECONSISTENCYCHECK},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"displaybind", tDISPLAYBIND},
|
|
|
|
{"dllname", tDLLNAME},
|
|
|
|
{"dual", tDUAL},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"enable_allocate", tENABLEALLOCATE},
|
|
|
|
{"encode", tENCODE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"endpoint", tENDPOINT},
|
|
|
|
{"entry", tENTRY},
|
|
|
|
{"explicit_handle", tEXPLICITHANDLE},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"fault_status", tFAULTSTATUS},
|
|
|
|
{"force_allocate", tFORCEALLOCATE},
|
|
|
|
{"free", tFREE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"handle", tHANDLE},
|
|
|
|
{"helpcontext", tHELPCONTEXT},
|
|
|
|
{"helpfile", tHELPFILE},
|
|
|
|
{"helpstring", tHELPSTRING},
|
|
|
|
{"helpstringcontext", tHELPSTRINGCONTEXT},
|
|
|
|
{"helpstringdll", tHELPSTRINGDLL},
|
|
|
|
{"hidden", tHIDDEN},
|
|
|
|
{"id", tID},
|
|
|
|
{"idempotent", tIDEMPOTENT},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"ignore", tIGNORE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"iid_is", tIIDIS},
|
|
|
|
{"immediatebind", tIMMEDIATEBIND},
|
|
|
|
{"implicit_handle", tIMPLICITHANDLE},
|
|
|
|
{"in", tIN},
|
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
|
|
|
{"in_line", tIN_LINE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"input_sync", tINPUTSYNC},
|
|
|
|
{"lcid", tLCID},
|
|
|
|
{"length_is", tLENGTHIS},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"licensed", tLICENSED},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"local", tLOCAL},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"maybe", tMAYBE},
|
|
|
|
{"message", tMESSAGE},
|
|
|
|
{"neutral", tNEUTRAL},
|
|
|
|
{"nocode", tNOCODE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"nonbrowsable", tNONBROWSABLE},
|
|
|
|
{"noncreatable", tNONCREATABLE},
|
|
|
|
{"nonextensible", tNONEXTENSIBLE},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"notify", tNOTIFY},
|
|
|
|
{"notify_flag", tNOTIFYFLAG},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"object", tOBJECT},
|
|
|
|
{"odl", tODL},
|
|
|
|
{"oleautomation", tOLEAUTOMATION},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"optimize", tOPTIMIZE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"optional", tOPTIONAL},
|
|
|
|
{"out", tOUT},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"partial_ignore", tPARTIALIGNORE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"pointer_default", tPOINTERDEFAULT},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"progid", tPROGID},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"propget", tPROPGET},
|
|
|
|
{"propput", tPROPPUT},
|
|
|
|
{"propputref", tPROPPUTREF},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"proxy", tPROXY},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"ptr", tPTR},
|
|
|
|
{"public", tPUBLIC},
|
|
|
|
{"range", tRANGE},
|
|
|
|
{"readonly", tREADONLY},
|
|
|
|
{"ref", tREF},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"represent_as", tREPRESENTAS},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"requestedit", tREQUESTEDIT},
|
|
|
|
{"restricted", tRESTRICTED},
|
|
|
|
{"retval", tRETVAL},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"single", tSINGLE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"size_is", tSIZEIS},
|
|
|
|
{"source", tSOURCE},
|
2008-01-18 12:41:15 +00:00
|
|
|
{"strict_context_handle", tSTRICTCONTEXTHANDLE},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"string", tSTRING},
|
|
|
|
{"switch_is", tSWITCHIS},
|
|
|
|
{"switch_type", tSWITCHTYPE},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"threading", tTHREADING},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"transmit_as", tTRANSMITAS},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"uidefault", tUIDEFAULT},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"unique", tUNIQUE},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"user_marshal", tUSERMARSHAL},
|
|
|
|
{"usesgetlasterror", tUSESGETLASTERROR},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"uuid", tUUID},
|
|
|
|
{"v1_enum", tV1ENUM},
|
|
|
|
{"vararg", tVARARG},
|
|
|
|
{"version", tVERSION},
|
2010-12-19 20:47:16 +00:00
|
|
|
{"vi_progid", tVIPROGID},
|
2008-01-11 13:46:33 +00:00
|
|
|
{"wire_marshal", tWIREMARSHAL},
|
|
|
|
};
|
|
|
|
|
2010-12-19 20:47:16 +00:00
|
|
|
/* attributes TODO:
|
|
|
|
custom
|
|
|
|
first_is
|
|
|
|
last_is
|
|
|
|
max_is
|
|
|
|
min_is
|
|
|
|
*/
|
2008-01-11 13:46:33 +00:00
|
|
|
|
2005-02-20 15:02:48 +00:00
|
|
|
#define KWP(p) ((const struct keyword *)(p))
|
|
|
|
|
|
|
|
static int kw_cmp_func(const void *s1, const void *s2)
|
|
|
|
{
|
|
|
|
return strcmp(KWP(s1)->kw, KWP(s2)->kw);
|
|
|
|
}
|
|
|
|
|
|
|
|
static int kw_token(const char *kw)
|
|
|
|
{
|
|
|
|
struct keyword key, *kwp;
|
|
|
|
key.kw = kw;
|
|
|
|
kwp = bsearch(&key, keywords, NKEYWORDS, sizeof(keywords[0]), kw_cmp_func);
|
2015-11-16 21:45:45 +00:00
|
|
|
if (kwp && (winrt_mode || kwp->token != tNAMESPACE)) {
|
2008-01-11 13:46:33 +00:00
|
|
|
parser_lval.str = xstrdup(kwp->kw);
|
2005-02-20 15:02:48 +00:00
|
|
|
return kwp->token;
|
|
|
|
}
|
2008-01-11 13:46:33 +00:00
|
|
|
parser_lval.str = xstrdup(kw);
|
2005-02-20 15:02:48 +00:00
|
|
|
return is_type(kw) ? aKNOWNTYPE : aIDENTIFIER;
|
|
|
|
}
|
|
|
|
|
2008-01-11 13:46:33 +00:00
|
|
|
static int attr_token(const char *kw)
|
|
|
|
{
|
|
|
|
struct keyword key, *kwp;
|
|
|
|
key.kw = kw;
|
|
|
|
kwp = bsearch(&key, attr_keywords, sizeof(attr_keywords)/sizeof(attr_keywords[0]),
|
|
|
|
sizeof(attr_keywords[0]), kw_cmp_func);
|
|
|
|
if (kwp) {
|
|
|
|
parser_lval.str = xstrdup(kwp->kw);
|
|
|
|
return kwp->token;
|
|
|
|
}
|
|
|
|
return kw_token(kw);
|
|
|
|
}
|
|
|
|
|
2005-02-20 15:02:48 +00:00
|
|
|
static void addcchar(char c)
|
|
|
|
{
|
|
|
|
if(cbufidx >= cbufalloc)
|
|
|
|
{
|
|
|
|
cbufalloc += 1024;
|
|
|
|
cbuffer = xrealloc(cbuffer, cbufalloc * sizeof(cbuffer[0]));
|
|
|
|
if(cbufalloc > 65536)
|
2008-01-11 13:46:33 +00:00
|
|
|
parser_warning("Reallocating string buffer larger than 64kB\n");
|
2005-02-20 15:02:48 +00:00
|
|
|
}
|
|
|
|
cbuffer[cbufidx++] = c;
|
|
|
|
}
|
|
|
|
|
|
|
|
static char *get_buffered_cstring(void)
|
|
|
|
{
|
|
|
|
addcchar(0);
|
|
|
|
return xstrdup(cbuffer);
|
|
|
|
}
|
|
|
|
|
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 pop_import(void)
|
2005-02-20 15:02:48 +00:00
|
|
|
{
|
|
|
|
int ptr = import_stack_ptr-1;
|
|
|
|
|
|
|
|
fclose(yyin);
|
|
|
|
yy_delete_buffer( YY_CURRENT_BUFFER );
|
|
|
|
yy_switch_to_buffer( import_stack[ptr].state );
|
|
|
|
if (temp_name) {
|
|
|
|
unlink(temp_name);
|
|
|
|
free(temp_name);
|
|
|
|
}
|
|
|
|
temp_name = import_stack[ptr].temp_name;
|
|
|
|
input_name = import_stack[ptr].input_name;
|
|
|
|
line_number = import_stack[ptr].line_number;
|
|
|
|
import_stack_ptr--;
|
|
|
|
}
|
|
|
|
|
|
|
|
struct imports {
|
2018-04-11 11:29:04 +00:00
|
|
|
char *name;
|
|
|
|
struct imports *next;
|
2005-02-20 15:02:48 +00:00
|
|
|
} *first_import;
|
|
|
|
|
|
|
|
int do_import(char *fname)
|
|
|
|
{
|
2018-04-11 11:29:04 +00:00
|
|
|
FILE *f;
|
|
|
|
char *path, *name;
|
|
|
|
struct imports *import;
|
|
|
|
int ptr = import_stack_ptr;
|
|
|
|
int ret, fd;
|
|
|
|
|
|
|
|
import = first_import;
|
|
|
|
while (import && strcmp(import->name, fname))
|
|
|
|
import = import->next;
|
|
|
|
if (import) return 0; /* already imported */
|
|
|
|
|
|
|
|
import = xmalloc(sizeof(struct imports));
|
|
|
|
import->name = xstrdup(fname);
|
|
|
|
import->next = first_import;
|
|
|
|
first_import = import;
|
|
|
|
|
|
|
|
/* don't search for a file name with a path in the include directories,
|
|
|
|
* for compatibility with MIDL */
|
|
|
|
if (strchr( fname, '/' ) || strchr( fname, '\\' ))
|
|
|
|
path = xstrdup( fname );
|
|
|
|
else if (!(path = wpp_find_include( fname, input_name )))
|
|
|
|
error_loc("Unable to open include file %s\n", fname);
|
|
|
|
|
|
|
|
if (import_stack_ptr == MAX_IMPORT_DEPTH)
|
|
|
|
error_loc("Exceeded max import depth\n");
|
|
|
|
|
|
|
|
import_stack[ptr].temp_name = temp_name;
|
|
|
|
import_stack[ptr].input_name = input_name;
|
|
|
|
import_stack[ptr].line_number = line_number;
|
|
|
|
import_stack_ptr++;
|
|
|
|
input_name = path;
|
|
|
|
line_number = 1;
|
|
|
|
|
|
|
|
name = xstrdup( "widl.XXXXXX" );
|
|
|
|
if((fd = mkstemps( name, 0 )) == -1)
|
|
|
|
error("Could not generate a temp name from %s\n", name);
|
|
|
|
|
|
|
|
temp_name = name;
|
|
|
|
if (!(f = fdopen(fd, "wt")))
|
|
|
|
error("Could not open fd %s for writing\n", name);
|
|
|
|
|
|
|
|
ret = wpp_parse( path, f );
|
|
|
|
fclose( f );
|
|
|
|
if (ret) exit(1);
|
|
|
|
|
|
|
|
if((f = fopen(temp_name, "r")) == NULL)
|
|
|
|
error_loc("Unable to open %s\n", temp_name);
|
|
|
|
|
|
|
|
import_stack[ptr].state = YY_CURRENT_BUFFER;
|
|
|
|
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
|
|
|
|
return 1;
|
2005-02-20 15:02:48 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void abort_import(void)
|
|
|
|
{
|
|
|
|
int ptr;
|
|
|
|
|
|
|
|
for (ptr=0; ptr<import_stack_ptr; ptr++)
|
|
|
|
unlink(import_stack[ptr].temp_name);
|
|
|
|
}
|
2016-07-03 11:16:23 +00:00
|
|
|
|
2019-01-29 12:18:09 +00:00
|
|
|
static void switch_to_acf(void)
|
|
|
|
{
|
|
|
|
int ptr = import_stack_ptr;
|
|
|
|
int ret, fd;
|
|
|
|
char *name;
|
|
|
|
FILE *f;
|
|
|
|
|
|
|
|
assert(import_stack_ptr == 0);
|
|
|
|
|
|
|
|
input_name = acf_name;
|
|
|
|
acf_name = NULL;
|
|
|
|
line_number = 1;
|
|
|
|
|
|
|
|
name = xstrdup( "widl.XXXXXX" );
|
|
|
|
if((fd = mkstemps( name, 0 )) == -1)
|
|
|
|
error("Could not generate a temp name from %s\n", name);
|
|
|
|
|
|
|
|
temp_name = name;
|
|
|
|
if (!(f = fdopen(fd, "wt")))
|
|
|
|
error("Could not open fd %s for writing\n", name);
|
|
|
|
|
|
|
|
ret = wpp_parse(input_name, f);
|
|
|
|
fclose(f);
|
|
|
|
if (ret) exit(1);
|
|
|
|
|
|
|
|
if((f = fopen(temp_name, "r")) == NULL)
|
|
|
|
error_loc("Unable to open %s\n", temp_name);
|
|
|
|
|
|
|
|
import_stack[ptr].state = YY_CURRENT_BUFFER;
|
|
|
|
yy_switch_to_buffer(yy_create_buffer(f, YY_BUF_SIZE));
|
|
|
|
}
|
|
|
|
|
2016-07-03 11:16:23 +00:00
|
|
|
static void warning_disable(int warning)
|
|
|
|
{
|
|
|
|
warning_t *warning_entry;
|
|
|
|
LIST_FOR_EACH_ENTRY(warning_entry, disabled_warnings, warning_t, entry)
|
|
|
|
if(warning_entry->num == warning)
|
|
|
|
return;
|
|
|
|
warning_entry = xmalloc( sizeof(*warning_entry) );
|
|
|
|
warning_entry->num = warning;
|
|
|
|
list_add_tail(disabled_warnings, &warning_entry->entry);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void warning_enable(int warning)
|
|
|
|
{
|
|
|
|
warning_t *warning_entry;
|
|
|
|
LIST_FOR_EACH_ENTRY(warning_entry, disabled_warnings, warning_t, entry)
|
|
|
|
if(warning_entry->num == warning)
|
|
|
|
{
|
|
|
|
list_remove(&warning_entry->entry);
|
|
|
|
free(warning_entry);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
int do_warning(char *toggle, warning_list_t *wnum)
|
|
|
|
{
|
|
|
|
warning_t *warning, *next;
|
|
|
|
int ret = 1;
|
|
|
|
if(!disabled_warnings)
|
|
|
|
{
|
|
|
|
disabled_warnings = xmalloc( sizeof(*disabled_warnings) );
|
|
|
|
list_init( disabled_warnings );
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!strcmp(toggle, "disable"))
|
|
|
|
LIST_FOR_EACH_ENTRY(warning, wnum, warning_t, entry)
|
|
|
|
warning_disable(warning->num);
|
|
|
|
else if(!strcmp(toggle, "enable"))
|
|
|
|
LIST_FOR_EACH_ENTRY(warning, wnum, warning_t, entry)
|
|
|
|
warning_enable(warning->num);
|
|
|
|
else
|
|
|
|
ret = 0;
|
|
|
|
|
|
|
|
LIST_FOR_EACH_ENTRY_SAFE(warning, next, wnum, warning_t, entry)
|
|
|
|
free(warning);
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
int is_warning_enabled(int warning)
|
|
|
|
{
|
|
|
|
warning_t *warning_entry;
|
|
|
|
if(!disabled_warnings)
|
|
|
|
return 1;
|
|
|
|
LIST_FOR_EACH_ENTRY(warning_entry, disabled_warnings, warning_t, entry)
|
|
|
|
if(warning_entry->num == warning)
|
|
|
|
return 0;
|
|
|
|
return 1;
|
|
|
|
}
|