Commit Graph

317 Commits

Author SHA1 Message Date
Rob Shearman
04a22cc412 widl: Hide the details of where arguments, fields, values and cases are stored in the type_t structure for functions, structures, enums and unions. 2008-12-29 14:42:47 +01:00
Rob Shearman
fbffe4a229 widl: Follow aliases in check_remoting_fields so that the fields for the type are correctly enumerated. 2008-12-29 14:42:18 +01:00
Alexandre Julliard
53626dbd93 widl: Add support for generating 32-bit and/or 64-bit code for proxies/clients/servers. 2008-12-26 17:22:25 +01:00
Alexandre Julliard
a011f0cd5b widl: Move determination of the exact type of structures and array to the code generation phase.
The exact type can depend on the size of the type in memory, and that
can vary depending on whether we are generating 32-bit or 64-bit code.
2008-12-26 17:16:06 +01:00
Alexandre Julliard
b4b8a342d7 widl: Add support for attributes on enum, struct and union definitions. 2008-10-10 12:54:05 +02:00
Dan Hipschman
790e6dcd29 widl: Honor typedef pointer attributes. 2008-08-18 14:34:10 +02:00
Rob Shearman
90d633cdd1 widl: Remove some unnecessary calls to duptype. 2008-07-07 12:11:23 +02:00
Rob Shearman
ed0c013849 widl: Rename find_type_helper, find_type and find_type2 to find_type, find_type_error and find_type_error2 respectively. 2008-07-07 12:11:23 +02:00
Dan Hipschman
d87bc0520f widl: Factor a small part of the grammar. 2008-07-02 11:41:31 +02:00
Dan Hipschman
6725c5d756 widl: Implement type redefinition checks.
This allows widl to catch type redefinitions and report an error, like MIDL.
However, this does a better job than MIDL since it also reports the location
of the originial definition, like GCC.
2008-07-02 11:40:50 +02:00
Rob Shearman
037fa861ab widl: Check that the structure has been defined in check_remoting_args. 2008-07-02 11:38:50 +02:00
Alexandre Julliard
6e9a6577c3 widl: [default] is an allowed attribute for union fields. 2008-06-26 21:10:32 +02:00
Rob Shearman
b2286fd45c widl: Fix check_remoting_fields to enumerate the correct list of fields. 2008-06-24 11:48:15 +02:00
Rob Shearman
4997f1849b widl: Fix the types of enums with the v1_enum attribute applied. 2008-06-24 11:48:03 +02:00
Rob Shearman
ada3ca6f09 widl: Set the type of the type_t node constructured for dispinterfaces to RPC_FC_IP, like we do for interfaces. 2008-06-24 11:47:51 +02:00
Rob Shearman
50e54c0c15 widl: Factor out the finding of a registered type to reduce code duplication. 2008-06-24 11:47:46 +02:00
Francois Gouget
633ee950a1 Assorted spelling fixes. 2008-05-07 12:07:11 +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
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
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
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
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
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
56e2553eff widl: Add support for the broadcast and idempotent operation attributes. 2008-04-14 13:39:28 +02:00
Rob Shearman
66b8574d8d widl: Output a warning if duplicate attributes are specified. 2008-04-14 13:39:21 +02:00
Rob Shearman
aa20221771 widl: Check that attributes are applicable for libraries, modules, dispinterfaces and coclasses and otherwise issue an error. 2008-04-14 13:39:16 +02:00
Rob Shearman
fcc8a028d8 widl: The odl attribute is valid for dispinterfaces. 2008-04-14 13:39:08 +02:00
Rob Shearman
e9afe272be widl: Check that attributes applied to typedefs and fields are applicable and issue an error otherwise. 2008-04-14 13:38:56 +02:00
Rob Shearman
5f39b41526 widl: Check that attributes applied to interfaces, functions and arguments are applicable and issue an error if not. 2008-04-14 13:38:48 +02:00
Rob Shearman
f7f31150ee widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. 2008-04-02 19:54:08 +02:00
Rob Shearman
bfde2c2e79 widl: Fix the writing out of function pointers with more than one level of indirection. 2008-04-02 19:54:01 +02:00
Rob Shearman
35ba23bd48 widl: Support __fastcall and __pascal calling conventions.
Support the synonyms for these and existing calling conventions.
2008-04-02 19:53:42 +02:00
Rob Shearman
d97f3205ba widl: Support parsing calling conventions for function identifiers.
Support automatically setting the calling convention to 
STDMETHODCALLTYPE if it is part of an object interface.

Write out the calling convention in write_type_v.
2008-04-02 19:53:23 +02:00
Rob Shearman
6a0c5a4fe9 widl: Store function and function pointer types completely within type_t type. 2008-04-02 19:53:09 +02:00
Rob Shearman
772f3af9f0 widl: Be more strict about where semicolons can appear in IDL files.
In particular, don't allow them after cpp_quote and without a statement.

Update the rules for importlib, library definition, dispinterface 
definition, interface definition, coclass definition and module 
definition to optionally allow a semicolon postfix.

Call pop_import from the parser instead of the lexer to ensure that 
pop_import is only called after the last statement in the imported file 
has been parsed.
2008-04-01 19:10:43 +02:00
Rob Shearman
a110cffd95 widl: Parse typedefs of function pointers. 2008-04-01 11:29:23 +02:00
Rob Shearman
59556de0c1 widl: Add support for generic binding handles. 2008-03-27 17:33:02 +01:00
Dan Hipschman
2fa83d94c8 widl: Make structures with FC_ENUM16 fields complex.
Structures containing enum fields without the v1_enum attribute must be
treated as complex because of the range check and memory/wire size
differences.  This includes a test which didn't pass before and now
passes on Wine and Windows.
2008-03-21 11:24:28 +01:00
Dan Hipschman
d37b1a4969 widl: Ignore libraries in imported IDL files. 2008-03-19 11:22:56 +01:00
Rob Shearman
15af19c6ec widl: Add support for strict context handles. 2008-01-07 12:32:21 +01:00
Rob Shearman
9741751962 widl: Remove some confusion in how version numbers are packed into an attribute by defining some macros for this purpose.
Remove unneeded includes.
2007-12-12 16:03:35 +01:00
Rob Shearman
85e87ae829 widl: iid_is should take expressions, not just identifiers. 2007-12-10 14:40:37 +01:00
Rob Shearman
72d9569cc4 widl: Support the address-of operator in expressions. 2007-12-10 14:40:29 +01:00
Rob Shearman
a513ff4926 widl: Don't override the pointer type in top-level arrays. 2007-12-08 19:57:25 +01:00
Dan Hipschman
ea7ab4da66 widl: Add a --local-stubs option. 2007-10-31 12:39:54 +01:00
Dan Hipschman
1aab1072c1 widl: Use error_loc instead of yyerror. 2007-10-24 13:51:58 +02:00
Dan Hipschman
1d0f9378bc widl: Detect conformant arrays of user types correctly. 2007-10-18 12:09:23 +02:00
Dan Hipschman
40e90aae25 widl: Generate dlldata files. 2007-10-18 12:09:02 +02:00
Gerald Pfeifer
a7c6a27696 widl: Fix build failure in parser.y. 2007-10-15 12:05:06 +02:00
Dan Hipschman
2226ddcadf widl: Keep track of every allocated type_t to simplify set_all_tfswrite. 2007-10-09 17:52:45 +02:00
Dan Hipschman
24ce74e96a widl: Implement pointer_default functionality. 2007-10-09 17:52:45 +02:00
Dan Hipschman
cfa5457270 widl: Allow quoted UUIDs. 2007-10-09 17:52:45 +02:00
Dan Hipschman
d00ff2ed58 widl: Make structs containing user types bogus; fix square_test_us test failure. 2007-10-09 11:39:26 +02:00
Dan Hipschman
9650cf9bdb widl: Correct default pointers. 2007-10-03 10:09:56 +02:00
Dan Hipschman
32a2477ef5 widl: Add a declonly argument to write_type_left. 2007-10-03 10:09:31 +02:00
Dan Hipschman
4c8c425f42 widl: Add newlines to error messages that are missing them. 2007-10-03 10:08:47 +02:00
Rob Shearman
a2fedc3769 widl: Write prototypes for context handle rundown rountines into generated header files. 2007-09-28 10:59:32 +02:00
Dan Hipschman
dbfabf68a2 widl: Respect pointer attributes better. 2007-09-20 14:27:25 +02:00
Dan Hipschman
132f06cd48 widl: Implement complex arrays. 2007-09-19 11:39:09 +02:00
Dan Hipschman
8df79f0c99 widl: Implement pointer descriptions for complex structures. 2007-09-19 11:38:28 +02:00
Rob Shearman
b7618f91d7 widl: Fix detection of complex arrays. 2007-09-17 12:57:03 +02:00
Rob Shearman
de7220e82d widl: Initialise cval in make_expr. 2007-09-17 12:57:00 +02:00
Dan Hipschman
5e84eb9a47 widl: Add padding to the end of complex structures. 2007-09-14 14:43:13 +02:00
Alexandre Julliard
40dda77c52 widl: Added support for floating-point constants. 2007-07-17 14:12:18 +02:00
Rob Shearman
be4cdefbf3 widl: Fix detection of structures with non-conformant strings. 2007-06-20 13:07:16 +02:00
Dan Hipschman
e4679b0c13 widl: Handle encapsulated unions. 2007-06-15 11:57:53 +02:00
Dan Hipschman
8709a06028 widl: Handle embedded interface pointers. 2007-06-15 11:56:17 +02:00
Dan Hipschman
c0982b42c5 widl: Handle wire_marshal types. 2007-06-14 11:35:44 +02:00
Dan Hipschman
88c8128704 widl: Simplify correlation descriptor code. 2007-06-12 11:13:30 +02:00
Dan Hipschman
4e22899e13 widl: Fix incomplete struct/union typedef bug. 2007-06-08 11:57:15 +02:00
Dan Hipschman
978b4d4f4e widl: Represent arrays with type_t. 2007-06-06 12:13:16 +02:00
Rob Shearman
f198dcf09b widl: A structure with variance, but without conformance should be a complex struct instead of a conformant, varying struct. 2007-05-31 12:25:03 +02:00
Dan Hipschman
8f7a5d63ec widl: Allow types that reference themselves. 2007-05-25 19:36:12 +02:00
Dan Hipschman
9c30da77ba widl: Shrink type_t structure. 2007-05-25 19:35:49 +02:00
Dan Hipschman
c5aaadc4c8 widl: Lay framework for unions with simple unions working. 2007-05-21 12:40:58 +02:00
Dan Hipschman
ef433e2792 widl: Remove var_t's ptr_level field and start write_pointers. 2007-05-11 12:33:27 +02:00
Dan Hipschman
541dddfde3 widl: Simplify make_safearray. 2007-05-10 12:55:33 +02:00
Dan Hipschman
d676d3be5f widl: Get rid of the tname field of var_t, simplify code. 2007-05-01 12:37:18 +02:00
Dan Hipschman
1ecbb01617 widl: Get rid of the typeref_t structure, simplify code. 2007-05-01 12:37:08 +02:00
Rob Shearman
1c2a717b59 widl: Implement writing of SAFEARRAY type descriptions in typelibs. 2007-03-07 20:10:32 +01:00
Alexandre Julliard
cc9a07f194 widl: Add a string list type and use it for the endpoint attribute. 2007-02-07 17:54:33 +01:00
Alexandre Julliard
24ded9e69a widl: Only recognize attribute keywords inside an attribute list. 2007-02-07 17:50:17 +01:00
Mike McCormack
609cd30277 widl: Implement dispinterfaces derived from an interface. 2007-02-06 13:20:46 +01:00
Alexandre Julliard
43ac6ed995 widl: Convert expression lists to standard Wine lists.
Add a specific type for array dimensions.
2007-01-22 14:31:40 +01:00
Alexandre Julliard
eed74e4e4a widl: Convert variable lists to standard Wine lists. 2007-01-22 14:26:12 +01:00
Alexandre Julliard
58827d026b widl: Convert function lists to standard Wine lists. 2007-01-22 14:23:08 +01:00
Alexandre Julliard
e262933bdf widl: Convert interface lists to standard Wine lists. 2007-01-22 14:21:56 +01:00
Alexandre Julliard
e998590557 widl: Convert attribute lists to standard Wine lists. 2007-01-22 14:20:36 +01:00
Michael Stefaniuc
0fb444b58c tools: Remove redundant NULL checks before free() (found by Smatch). 2006-10-10 12:56:20 +02:00
Alexandre Julliard
86bb809e5b widl: Change the prefix on bison-generated names to avoid the name-prefix directive. 2006-09-12 09:05:07 +02:00
Alexandre Julliard
bcdc5fb55f Make.rules: Set the default prefix for bison files from the file basename. 2006-09-11 21:47:49 +02:00
Dan Hipschman
a407da4775 widl: Sanity check string and pointer attrs. Don't assign string as type. 2006-09-07 10:50:18 +02:00
Dan Hipschman
180ede5bfe widl: Handle more pointer types in get_struct_type. 2006-09-07 10:49:58 +02:00
Dan Hipschman
88820263c6 widl: Remove checks for typedefs that always fail. 2006-09-07 10:49:46 +02:00
Dan Hipschman
1687a5d1db widl: Generate an error for "int f(void a)". 2006-09-07 10:21:39 +02:00
Dan Hipschman
929a759895 widl: Add an is_ptr function. 2006-09-07 10:21:13 +02:00
Dan Hipschman
aadc90b266 widl: Factor the entry_t structure. 2006-09-07 10:20:56 +02:00
Dan Hipschman
c117a20cdb widl: Use type_t for typedefs, not var_t. Simplify representation. 2006-09-07 10:20:41 +02:00
Dan Hipschman
59cfad37aa widl: Generate names for tagless structs, unions and enums. 2006-09-07 10:19:48 +02:00
Alexandre Julliard
883aef172d widl: xmalloc shouldn't initialize to zero, do that explicitly where needed. 2006-08-26 21:41:37 +02:00
Dan Hipschman
94755218ac widl: Remove usage of type_t ref field for base types; simplify code. 2006-08-25 11:32:05 +02:00
Andrew Talbot
daa2f97bdc widl: Write-strings warning fix. 2006-08-25 11:27:45 +02:00
Dan Hipschman
16d4e71230 widl: Calculate method indices in parser instead of during header generation. 2006-08-16 12:48:52 +02:00
Dan Hipschman
06497dd44c widl: Use ref_type to simplify some code. 2006-08-12 11:40:30 +02:00
Dan Hipschman
df91150e10 widl: Generate GUID (infile_i.c) files. 2006-08-04 13:25:37 +02:00
Dan Hipschman
99056d7e2a widl: Write forward declarations for coclass definitions. 2006-08-03 22:29:58 +02:00
Dan Hipschman
3e1ace5aa3 widl: Set type_t kind field correctly for all types. 2006-07-31 21:40:37 +02:00
Dan Hipschman
23707beb46 widl: Set defined flag for coclasses. 2006-07-31 21:36:31 +02:00
Dan Hipschman
678ce9875f widl: Encode coclass types in typelibs. 2006-07-29 11:55:20 +02:00
Dan Hipschman
9265d77584 widl: Register types for coclasses. 2006-07-29 11:55:08 +02:00
Dan Hipschman
c67b19b4f4 widl: Fold class_t into type_t. 2006-07-29 11:54:09 +02:00
Dan Hipschman
3b3632a1cd widl: Allow trailing commas in attribute lists. 2006-07-26 10:24:06 +02:00
Dan Hipschman
12a9dfd62f widl: Support SAFEARRAY(type) syntax. 2006-07-25 11:21:41 +02:00
Dan Hipschman
2660b8f9c1 widl: Support coclass forward declarations. 2006-07-14 13:32:38 +02:00
Robert Shearman
f627845624 widl: Add support for the builtin constants "TRUE" and "FALSE". 2006-07-07 14:30:34 +02:00
Robert Shearman
996c4f1f93 widl: Support coclass forward declarations. 2006-06-07 11:47:21 +02:00
Robert Shearman
fa4f94bdd5 widl: Allow some more "reserved words" to be used as identifiers. 2006-05-31 15:47:50 +02:00
Jonathan Ernst
360a3f9142 Update the address of the Free Software Foundation. 2006-05-23 14:11:13 +02:00