Commit Graph

668 Commits

Author SHA1 Message Date
Marcus Meissner 1ff216c874 widl: Mark non-returning functions as noreturn. 2008-05-07 12:07:54 +02:00
Francois Gouget 633ee950a1 Assorted spelling fixes. 2008-05-07 12:07:11 +02:00
Francois Gouget d2364d5d27 Add a comment warning when a table must be kept sorted for later use with bsearch(). 2008-05-06 16:11:09 +02:00
Gerald Pfeifer 652602f5c8 widl: Fix syntax to also work with older versions of bison. 2008-05-02 16:05:48 +02:00
Rob Shearman 033cade616 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.
2008-05-01 18:11:26 +02:00
Rob Shearman e71219e66e 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.
2008-04-30 16:59:47 +02:00
Rob Shearman d64e4c26ee 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.
2008-04-30 16:59:30 +02:00
Rob Shearman e35c79efbf widl: callback, code, comm_status and in_line are attribute names, not keywords. 2008-04-30 11:32:08 +02:00
Rob Shearman 48153a8944 widl: Allow pointer attributes to be applied to function pointers. 2008-04-30 11:31:51 +02:00
Rob Shearman 017213e11a widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. 2008-04-30 11:31:47 +02:00
Rob Shearman 4f8f89e6bb widl: Add support for "inline" on function definitions.
Fix applying calling convention to function type.
2008-04-30 11:31:21 +02:00
Rob Shearman 146ef11b77 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.
2008-04-30 11:30:55 +02:00
Rob Shearman 0cb73cef0b widl: Accept integer constant suffixes in the lexer. 2008-04-28 13:28:16 +02:00
Rob Shearman 62a6475593 widl: Support hex digits that use an uppercase 0X prefix. 2008-04-28 13:28:16 +02:00
Rob Shearman 80be9df3a7 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. 2008-04-28 13:28:16 +02:00
Rob Shearman 242a8a02f5 widl: Move the func_declarator rule entirely into direct_declarator. 2008-04-25 12:10:42 +02:00
Rob Shearman 66fa9a714e widl: Create a statement object for import statements.
Move the writing of include directives into the generated header into 
header.c.
2008-04-25 12:10:34 +02:00
Rob Shearman 33c891e694 widl: Add support for string literals and wide-string literals in expressions. 2008-04-25 12:10:24 +02:00
Rob Shearman 957dd4b160 widl: Add support for declaring multiple fields of a structure in one statement. 2008-04-25 12:10:15 +02:00
Rob Shearman 14dd441c5b 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.
2008-04-25 12:10:04 +02:00
Rob Shearman 21cd6865c8 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.
2008-04-25 12:09:56 +02:00
Rob Shearman 2f381f30a6 widl: Consolidate most of the inner loop of reg_typedefs into set_type. 2008-04-25 12:09:46 +02:00
Rob Shearman 1fcc2084e8 widl: Add typedef statements to the statement lists. 2008-04-24 22:32:47 +02:00
Rob Shearman df0e38c067 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. 2008-04-24 22:32:20 +02:00
Rob Shearman 58be89230e widl: Allow NULL to be used in expressions. 2008-04-24 22:31:47 +02:00
Rob Shearman ec81a78f01 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level.
This method is more flexible and somewhat simpler.
2008-04-24 22:31:37 +02:00
Rob Shearman 02f5412a53 widl: Implement lcid property on library declarations. 2008-04-24 22:31:20 +02:00
Rob Shearman 1a0d28bf02 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. 2008-04-22 13:05:18 +02:00
Rob Shearman 39a1fa672a 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.
2008-04-22 13:05:04 +02:00
Rob Shearman 80ab2a7c6d widl: Move expression functions to a new file, expr.c. 2008-04-22 13:04:58 +02:00
Rob Shearman 6244565df3 widl: Check that expressions resolve so that expressions in generated code will compile.
Also check that expressions return the correct type for the attribute.
2008-04-22 13:04:45 +02:00
Rob Shearman b88d82a14b widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. 2008-04-22 13:04:31 +02:00
Rob Shearman b81904b8ee widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. 2008-04-22 13:04:24 +02:00
Rob Shearman 95ac84e20b widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. 2008-04-22 13:04:19 +02:00
Rob Shearman cc3682cf12 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. 2008-04-22 13:04:03 +02:00
Rob Shearman 6f9020290b widl: Require a constant expression for case statements. 2008-04-22 13:03:39 +02:00
Rob Shearman b599d2596b widl: Fix operator precedence in expressions. 2008-04-22 13:03:34 +02:00
Rob Shearman ea9932557a widl: Add support for '%' operator in expressions. 2008-04-21 13:36:19 +02:00
Rob Shearman d27c7601e5 widl: Add support for arrays in expressions. 2008-04-21 13:36:19 +02:00
Rob Shearman 03d5017416 widl: Add support for "->" and "." operators in expressions. 2008-04-21 13:36:19 +02:00
Rob Shearman efd10742ec widl: Issue an error instead of crashing for dividing by zero in a constant expression. 2008-04-21 13:36:19 +02:00
Rob Shearman c46fcfb356 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. 2008-04-21 13:36:19 +02:00
Rob Shearman c4ca32bbda 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.)
2008-04-21 13:36:19 +02:00
Rob Shearman 15612e60fd widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. 2008-04-21 13:36:19 +02:00
Rob Shearman 6e27e7840f widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. 2008-04-21 13:36:19 +02:00
Rob Shearman 4b56ff7238 widl: Change alls calls to error in the parser to error_loc so that line number information is printed. 2008-04-16 14:07:35 +02:00
Rob Shearman 2ac495c85d widl: Add checking to arguments of non-local functions.
Check that out arguments have enough levels of indirection and that they 
don't derive from void * or a function pointer.
2008-04-14 13:39:47 +02:00
Rob Shearman 0053599688 widl: Add functions to print an error or warning message using location information to enable these to be printed accurately when a check is done after an element is parsed.
Add location information to variable automatically, since this is will 
be useful for type checking of arguments.
2008-04-14 13:39:42 +02:00
Rob Shearman f728fe168b widl: Write out TYPEFLAG, FUNCFLAG and VARFLAG flags for all attribute we currently parse.
Add FIXMEs for the remaining ones and remove the warning for 
unimplemented attribute types since we now support all the attributes 
that we parse.
2008-04-14 13:39:35 +02:00
Rob Shearman 56e2553eff widl: Add support for the broadcast and idempotent operation attributes. 2008-04-14 13:39:28 +02:00