2004-08-17 23:25:07 +04:00
This directory contains the source code of the pidl (Perl IDL)
compiler.
2005-07-09 16:58:08 +04:00
pidl is the main file of pidl.
2004-08-17 23:25:07 +04:00
Pidl works by building a parse tree from a .pidl file (a simple
dump of it's internal parse tree) or a .idl file
(a file format mostly like the IDL file format midl uses).
The IDL file parser is in idl.yp (a yacc file converted to
perl code by yapp)
After a parse tree is present, pidl will call one of it's backends
(which one depends on the options given on the command-line). Here is
a list of current backends:
2005-02-21 17:30:49 +03:00
-- Generic --
2004-08-17 23:25:07 +04:00
dump.pm - Converts the parse tree back to an IDL file
2005-02-21 17:30:49 +03:00
validator.pm - Validates the parse tree
-- DCE/RPC+NDR --
2005-06-15 14:11:33 +04:00
ndr.pm - Generates intermediate datastructures for use by NDR parses/generators
2005-03-06 15:33:44 +03:00
ndr_client.pm - Generates client call functions in C using the NDR parser
r6973: Merge new version of pidl into the main SAMBA_4_0 branch.
The main difference in this new version is the extra data structure generated
between the IDL data structure and the NDR parser:
IDL -> NDR -> { ndr_parser, ndr_header, eparser, etc }
This makes the ndr_parser.pm internals much more sane.
Other changes include:
- Remove unnecessary calls with NDR_BUFFERS (for example, GUID doesn't have any buffers, just scalars) as well as some (unnecessary) nested setting of flags.
- Parse array loops in the C code rather then calling ndr_pull_array(). This allows us to have, for example, arrays of pointers or arrays of pointers to arrays, etc..
- Use if() {} rather then if () goto foo; everywhere
- NDR_IN no longer implies LIBNDR_FLAG_REF_ALLOC
- By default, top level pointers are now "ref" (as is the default in
most other IDL compilers). This can be overridden using the
default_pointer_top() property.
- initial work on new ethereal parser generators by Alan DeKok and me
- pidl now writes errors in the standard format used by compilers, which
is parsable by most editors
- ability to warn about the fact that pidl extension(s) have been used,
useful for making sure IDL files work with other IDL compilers.
oh, and there's probably some other things I can't think of right now..
(This used to be commit 13cf227615f6b9e0e5fa62e59197024410254f01)
2005-05-25 17:50:27 +04:00
eth_parser.pm - Generates a parser for the ethereal network sniffer
eth_header.pm - Generates a header for ethereal
2005-02-21 17:30:49 +03:00
swig.pm - Generates SWIG interface files (.i)
2005-03-06 15:33:44 +03:00
ndr_header.pm - Generates a header file with structures
2005-06-15 14:11:33 +04:00
ndr_parser.pm - Generates pull/push functions for parsing NDR
2004-08-17 23:25:07 +04:00
server.pm - Generates server side implementation in C
template.pm - Generates stubs in C for server implementation
2005-07-09 16:58:08 +04:00
ejs.pm - Generates bindings for Embedded JavaScript (EJS)
ejs_header.pm - Generates headers for the EJS bindings
2004-08-17 23:25:07 +04:00
2005-02-21 17:30:49 +03:00
-- COM / DCOM --
odl.pm - Generates IDL structures from ODL structures for use in
the NDR parser generator
dcom_proxy.pm - Generates proxy object for DCOM (client-side)
dcom_stub.pm - Generates stub call handler for DCOM (server-side)
com_header.pm - Generates header file for COM interface(s)
-- Utility modules --
2004-08-17 23:25:07 +04:00
tables.pl - Generates a table of available interfaces from a list of IDL files
util.pm - Misc utility functions used by *.pm and pidl.pl
2005-02-21 17:30:49 +03:00
typelist.pm - Utility functions for keeping track of known types and their
representation in C
2004-08-17 23:25:07 +04:00
Tips for hacking on pidl:
- Look at the pidl's parse tree by using the --keep option and looking
at the generated .pidl file.
- The various backends have a lot in common, if you don't understand how one
implements something, look at the others
- See pidl(1) and the documentation on midl
- See 'info bison' and yapp(1) for information on the file format of idl.yp