[SCM] Samba Shared Repository - branch master updated - b16a8f31ad7b6434b44e24e96b72d877a7ede356

Jelmer Vernooij jelmer at samba.org
Wed Sep 17 15:14:00 GMT 2008


The branch, master has been updated
       via  b16a8f31ad7b6434b44e24e96b72d877a7ede356 (commit)
       via  79190992b3820cd028c961c48bdea9b35baf13c9 (commit)
      from  3b5330e9094ecf0be94d3dbea744de140ec55e19 (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit b16a8f31ad7b6434b44e24e96b72d877a7ede356
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 17 17:13:02 2008 +0200

    Fix location of included popt files for systems that don't have popt.

commit 79190992b3820cd028c961c48bdea9b35baf13c9
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Wed Sep 17 17:12:27 2008 +0200

    Move pidl to top-level directory.

-----------------------------------------------------------------------

Summary of changes:
 pidl/MANIFEST                                      |   43 +
 pidl/META.yml                                      |   18 +
 pidl/Makefile.PL                                   |   17 +
 pidl/README                                        |   64 +
 pidl/TODO                                          |   47 +
 pidl/config.m4                                     |    9 +
 pidl/config.mk                                     |   31 +
 pidl/expr.yp                                       |  150 ++
 pidl/idl.yp                                        |  497 ++++
 pidl/lib/Parse/Pidl.pm                             |   38 +
 pidl/lib/Parse/Pidl/CUtil.pm                       |   52 +
 pidl/lib/Parse/Pidl/Compat.pm                      |  163 ++
 pidl/lib/Parse/Pidl/Dump.pm                        |  294 +++
 pidl/lib/Parse/Pidl/Expr.pm                        | 1442 +++++++++++
 pidl/lib/Parse/Pidl/IDL.pm                         | 2534 ++++++++++++++++++
 pidl/lib/Parse/Pidl/NDR.pm                         | 1235 +++++++++
 pidl/lib/Parse/Pidl/ODL.pm                         |  117 +
 pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm            |  243 ++
 pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm            |  268 ++
 pidl/lib/Parse/Pidl/Samba4.pm                      |  119 +
 pidl/lib/Parse/Pidl/Samba4/COM/Header.pm           |  155 ++
 pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm            |  221 ++
 pidl/lib/Parse/Pidl/Samba4/COM/Stub.pm             |  327 +++
 pidl/lib/Parse/Pidl/Samba4/EJS.pm                  |  874 +++++++
 pidl/lib/Parse/Pidl/Samba4/Header.pm               |  475 ++++
 pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm           |  156 ++
 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm           | 2695 ++++++++++++++++++++
 pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm           |  328 +++
 pidl/lib/Parse/Pidl/Samba4/Python.pm               | 1216 +++++++++
 pidl/lib/Parse/Pidl/Samba4/SWIG.pm                 |  177 ++
 pidl/lib/Parse/Pidl/Samba4/TDR.pm                  |  281 ++
 pidl/lib/Parse/Pidl/Samba4/Template.pm             |   98 +
 pidl/lib/Parse/Pidl/Typelist.pm                    |  301 +++
 pidl/lib/Parse/Pidl/Util.pm                        |  182 ++
 pidl/lib/Parse/Pidl/Wireshark/Conformance.pm       |  439 ++++
 pidl/lib/Parse/Pidl/Wireshark/NDR.pm               | 1141 +++++++++
 pidl/lib/Parse/Yapp/Driver.pm                      |  471 ++++
 pidl/pidl                                          |  808 ++++++
 pidl/tests/Util.pm                                 |  179 ++
 pidl/tests/cutil.pl                                |   21 +
 pidl/tests/dump.pl                                 |   15 +
 pidl/tests/header.pl                               |  108 +
 pidl/tests/ndr.pl                                  |  558 ++++
 pidl/tests/ndr_align.pl                            |  143 ++
 pidl/tests/ndr_alloc.pl                            |  118 +
 pidl/tests/ndr_array.pl                            |   37 +
 pidl/tests/ndr_compat.pl                           |   21 +
 pidl/tests/ndr_deprecations.pl                     |   26 +
 pidl/tests/ndr_fullptr.pl                          |   44 +
 pidl/tests/ndr_refptr.pl                           |  526 ++++
 pidl/tests/ndr_represent.pl                        |   71 +
 pidl/tests/ndr_simple.pl                           |   28 +
 pidl/tests/ndr_string.pl                           |   90 +
 pidl/tests/ndr_tagtype.pl                          |   66 +
 pidl/tests/parse_idl.pl                            |  164 ++
 pidl/tests/samba-ejs.pl                            |   37 +
 pidl/tests/samba-ndr.pl                            |  296 +++
 pidl/tests/samba3-cli.pl                           |  126 +
 pidl/tests/samba3-srv.pl                           |   18 +
 pidl/tests/tdr.pl                                  |   49 +
 pidl/tests/test_util.pl                            |   21 +
 pidl/tests/typelist.pl                             |   85 +
 pidl/tests/util.pl                                 |  115 +
 pidl/tests/wireshark-conf.pl                       |  205 ++
 pidl/tests/wireshark-ndr.pl                        |  274 ++
 source3/Makefile.in                                |    6 +-
 source4/Makefile                                   |    2 +-
 source4/pidl/MANIFEST                              |   43 -
 source4/pidl/META.yml                              |   18 -
 source4/pidl/Makefile.PL                           |   17 -
 source4/pidl/README                                |   64 -
 source4/pidl/TODO                                  |   47 -
 source4/pidl/config.m4                             |    9 -
 source4/pidl/config.mk                             |   31 -
 source4/pidl/expr.yp                               |  150 --
 source4/pidl/idl.yp                                |  497 ----
 source4/pidl/lib/Parse/Pidl.pm                     |   38 -
 source4/pidl/lib/Parse/Pidl/CUtil.pm               |   52 -
 source4/pidl/lib/Parse/Pidl/Compat.pm              |  163 --
 source4/pidl/lib/Parse/Pidl/Dump.pm                |  294 ---
 source4/pidl/lib/Parse/Pidl/Expr.pm                | 1442 -----------
 source4/pidl/lib/Parse/Pidl/IDL.pm                 | 2534 ------------------
 source4/pidl/lib/Parse/Pidl/NDR.pm                 | 1235 ---------
 source4/pidl/lib/Parse/Pidl/ODL.pm                 |  117 -
 source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm    |  243 --
 source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm    |  268 --
 source4/pidl/lib/Parse/Pidl/Samba4.pm              |  119 -
 source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm   |  155 --
 source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm    |  221 --
 source4/pidl/lib/Parse/Pidl/Samba4/COM/Stub.pm     |  327 ---
 source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm          |  874 -------
 source4/pidl/lib/Parse/Pidl/Samba4/Header.pm       |  475 ----
 source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm   |  156 --
 source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm   | 2695 --------------------
 source4/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm   |  328 ---
 source4/pidl/lib/Parse/Pidl/Samba4/Python.pm       | 1216 ---------
 source4/pidl/lib/Parse/Pidl/Samba4/SWIG.pm         |  177 --
 source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm          |  281 --
 source4/pidl/lib/Parse/Pidl/Samba4/Template.pm     |   98 -
 source4/pidl/lib/Parse/Pidl/Typelist.pm            |  301 ---
 source4/pidl/lib/Parse/Pidl/Util.pm                |  182 --
 .../pidl/lib/Parse/Pidl/Wireshark/Conformance.pm   |  439 ----
 source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm       | 1141 ---------
 source4/pidl/lib/Parse/Yapp/Driver.pm              |  471 ----
 source4/pidl/pidl                                  |  808 ------
 source4/pidl/tests/Util.pm                         |  179 --
 source4/pidl/tests/cutil.pl                        |   21 -
 source4/pidl/tests/dump.pl                         |   15 -
 source4/pidl/tests/header.pl                       |  108 -
 source4/pidl/tests/ndr.pl                          |  558 ----
 source4/pidl/tests/ndr_align.pl                    |  143 --
 source4/pidl/tests/ndr_alloc.pl                    |  118 -
 source4/pidl/tests/ndr_array.pl                    |   37 -
 source4/pidl/tests/ndr_compat.pl                   |   21 -
 source4/pidl/tests/ndr_deprecations.pl             |   26 -
 source4/pidl/tests/ndr_fullptr.pl                  |   44 -
 source4/pidl/tests/ndr_refptr.pl                   |  526 ----
 source4/pidl/tests/ndr_represent.pl                |   71 -
 source4/pidl/tests/ndr_simple.pl                   |   28 -
 source4/pidl/tests/ndr_string.pl                   |   90 -
 source4/pidl/tests/ndr_tagtype.pl                  |   66 -
 source4/pidl/tests/parse_idl.pl                    |  164 --
 source4/pidl/tests/samba-ejs.pl                    |   37 -
 source4/pidl/tests/samba-ndr.pl                    |  296 ---
 source4/pidl/tests/samba3-cli.pl                   |  126 -
 source4/pidl/tests/samba3-srv.pl                   |   18 -
 source4/pidl/tests/tdr.pl                          |   49 -
 source4/pidl/tests/test_util.pl                    |   21 -
 source4/pidl/tests/typelist.pl                     |   85 -
 source4/pidl/tests/util.pl                         |  115 -
 source4/pidl/tests/wireshark-conf.pl               |  205 --
 source4/pidl/tests/wireshark-ndr.pl                |  274 --
 source4/selftest/samba4_tests.sh                   |    2 +-
 133 files changed, 21172 insertions(+), 21172 deletions(-)
 create mode 100644 pidl/MANIFEST
 create mode 100644 pidl/META.yml
 create mode 100755 pidl/Makefile.PL
 create mode 100644 pidl/README
 create mode 100644 pidl/TODO
 create mode 100644 pidl/config.m4
 create mode 100644 pidl/config.mk
 create mode 100644 pidl/expr.yp
 create mode 100644 pidl/idl.yp
 create mode 100644 pidl/lib/Parse/Pidl.pm
 create mode 100644 pidl/lib/Parse/Pidl/CUtil.pm
 create mode 100644 pidl/lib/Parse/Pidl/Compat.pm
 create mode 100644 pidl/lib/Parse/Pidl/Dump.pm
 create mode 100644 pidl/lib/Parse/Pidl/Expr.pm
 create mode 100644 pidl/lib/Parse/Pidl/IDL.pm
 create mode 100644 pidl/lib/Parse/Pidl/NDR.pm
 create mode 100644 pidl/lib/Parse/Pidl/ODL.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/COM/Stub.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/EJS.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/Header.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/Python.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/SWIG.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/TDR.pm
 create mode 100644 pidl/lib/Parse/Pidl/Samba4/Template.pm
 create mode 100644 pidl/lib/Parse/Pidl/Typelist.pm
 create mode 100644 pidl/lib/Parse/Pidl/Util.pm
 create mode 100644 pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
 create mode 100644 pidl/lib/Parse/Pidl/Wireshark/NDR.pm
 create mode 100644 pidl/lib/Parse/Yapp/Driver.pm
 create mode 100755 pidl/pidl
 create mode 100644 pidl/tests/Util.pm
 create mode 100755 pidl/tests/cutil.pl
 create mode 100755 pidl/tests/dump.pl
 create mode 100755 pidl/tests/header.pl
 create mode 100755 pidl/tests/ndr.pl
 create mode 100755 pidl/tests/ndr_align.pl
 create mode 100755 pidl/tests/ndr_alloc.pl
 create mode 100755 pidl/tests/ndr_array.pl
 create mode 100755 pidl/tests/ndr_compat.pl
 create mode 100755 pidl/tests/ndr_deprecations.pl
 create mode 100755 pidl/tests/ndr_fullptr.pl
 create mode 100755 pidl/tests/ndr_refptr.pl
 create mode 100755 pidl/tests/ndr_represent.pl
 create mode 100755 pidl/tests/ndr_simple.pl
 create mode 100755 pidl/tests/ndr_string.pl
 create mode 100755 pidl/tests/ndr_tagtype.pl
 create mode 100755 pidl/tests/parse_idl.pl
 create mode 100755 pidl/tests/samba-ejs.pl
 create mode 100755 pidl/tests/samba-ndr.pl
 create mode 100755 pidl/tests/samba3-cli.pl
 create mode 100644 pidl/tests/samba3-srv.pl
 create mode 100755 pidl/tests/tdr.pl
 create mode 100755 pidl/tests/test_util.pl
 create mode 100755 pidl/tests/typelist.pl
 create mode 100755 pidl/tests/util.pl
 create mode 100755 pidl/tests/wireshark-conf.pl
 create mode 100755 pidl/tests/wireshark-ndr.pl
 delete mode 100644 source4/pidl/MANIFEST
 delete mode 100644 source4/pidl/META.yml
 delete mode 100755 source4/pidl/Makefile.PL
 delete mode 100644 source4/pidl/README
 delete mode 100644 source4/pidl/TODO
 delete mode 100644 source4/pidl/config.m4
 delete mode 100644 source4/pidl/config.mk
 delete mode 100644 source4/pidl/expr.yp
 delete mode 100644 source4/pidl/idl.yp
 delete mode 100644 source4/pidl/lib/Parse/Pidl.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/CUtil.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Compat.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Dump.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Expr.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/IDL.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/NDR.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/ODL.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba3/ServerNDR.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/COM/Header.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/COM/Proxy.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/COM/Stub.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/Header.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/NDR/Server.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/Python.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/SWIG.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/TDR.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Samba4/Template.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Typelist.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Util.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Wireshark/Conformance.pm
 delete mode 100644 source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm
 delete mode 100644 source4/pidl/lib/Parse/Yapp/Driver.pm
 delete mode 100755 source4/pidl/pidl
 delete mode 100644 source4/pidl/tests/Util.pm
 delete mode 100755 source4/pidl/tests/cutil.pl
 delete mode 100755 source4/pidl/tests/dump.pl
 delete mode 100755 source4/pidl/tests/header.pl
 delete mode 100755 source4/pidl/tests/ndr.pl
 delete mode 100755 source4/pidl/tests/ndr_align.pl
 delete mode 100755 source4/pidl/tests/ndr_alloc.pl
 delete mode 100755 source4/pidl/tests/ndr_array.pl
 delete mode 100755 source4/pidl/tests/ndr_compat.pl
 delete mode 100755 source4/pidl/tests/ndr_deprecations.pl
 delete mode 100755 source4/pidl/tests/ndr_fullptr.pl
 delete mode 100755 source4/pidl/tests/ndr_refptr.pl
 delete mode 100755 source4/pidl/tests/ndr_represent.pl
 delete mode 100755 source4/pidl/tests/ndr_simple.pl
 delete mode 100755 source4/pidl/tests/ndr_string.pl
 delete mode 100755 source4/pidl/tests/ndr_tagtype.pl
 delete mode 100755 source4/pidl/tests/parse_idl.pl
 delete mode 100755 source4/pidl/tests/samba-ejs.pl
 delete mode 100755 source4/pidl/tests/samba-ndr.pl
 delete mode 100755 source4/pidl/tests/samba3-cli.pl
 delete mode 100644 source4/pidl/tests/samba3-srv.pl
 delete mode 100755 source4/pidl/tests/tdr.pl
 delete mode 100755 source4/pidl/tests/test_util.pl
 delete mode 100755 source4/pidl/tests/typelist.pl
 delete mode 100755 source4/pidl/tests/util.pl
 delete mode 100755 source4/pidl/tests/wireshark-conf.pl
 delete mode 100755 source4/pidl/tests/wireshark-ndr.pl


Changeset truncated at 500 lines:

diff --git a/pidl/MANIFEST b/pidl/MANIFEST
new file mode 100644
index 0000000..051c5d2
--- /dev/null
+++ b/pidl/MANIFEST
@@ -0,0 +1,43 @@
+MANIFEST
+tests/parse_idl.pl
+tests/Util.pm
+tests/ndr_refptr.pl
+tests/ndr_string.pl
+tests/ndr_simple.pl
+tests/ndr_align.pl
+tests/ndr_alloc.pl
+tests/ndr_array.pl
+tests/ndr.pl
+tests/samba-ndr.pl
+tests/util.pl
+tests/test_util.pl
+tests/ndr_represent.pl
+tests/ndr_compat.pl
+tests/ndr_fullptr.pl
+tests/ndr_tagtype.pl
+tests/header.pl
+lib/Parse/Pidl/Samba3/ClientNDR.pm
+lib/Parse/Pidl/Samba3/ServerNDR.pm
+lib/Parse/Pidl/Samba4/NDR/Server.pm
+lib/Parse/Pidl/Samba4/NDR/Parser.pm
+lib/Parse/Pidl/Samba4/NDR/Client.pm
+lib/Parse/Pidl/Samba4/Header.pm
+lib/Parse/Pidl/Samba4/SWIG.pm
+lib/Parse/Pidl/Samba4/TDR.pm
+lib/Parse/Pidl/Samba4/Template.pm
+lib/Parse/Pidl/Samba4/EJS.pm
+lib/Parse/Pidl/Samba4.pm
+lib/Parse/Pidl/Wireshark/Conformance.pm
+lib/Parse/Pidl/Wireshark/NDR.pm
+lib/Parse/Pidl/Typelist.pm
+lib/Parse/Pidl/Dump.pm
+lib/Parse/Pidl/Compat.pm
+lib/Parse/Pidl/Util.pm
+lib/Parse/Pidl/NDR.pm
+lib/Parse/Pidl.pm
+Makefile.PL
+idl.yp
+TODO
+README
+pidl
+META.yml
diff --git a/pidl/META.yml b/pidl/META.yml
new file mode 100644
index 0000000..4822b50
--- /dev/null
+++ b/pidl/META.yml
@@ -0,0 +1,18 @@
+name: Parse-Pidl
+abstract: Generate parsers / DCE/RPC-clients from IDL
+author:
+    - Andrew Tridgell <tridge at samba.org>
+    - Jelmer Vernooij <jelmer at samba.org>
+    - Stefan Metzmacher <metze at samba.org>
+    - Tim Potter <tpot at samba.org>
+license: gplv3
+installdirs:  site
+homepage: http://www.samba.org/
+bugtracker: http://bugzilla.samba.org/
+requires:
+    Parse::Yapp: 0    
+recommends:
+    Data::Dumper: 0
+meta-spec:
+    version: 1.3
+    url: http://module-build.sourceforge.net/META-spec-v1.3.html
diff --git a/pidl/Makefile.PL b/pidl/Makefile.PL
new file mode 100755
index 0000000..2a405fc
--- /dev/null
+++ b/pidl/Makefile.PL
@@ -0,0 +1,17 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+    'NAME'	=> 'Parse::Pidl',
+    'VERSION_FROM' => 'lib/Parse/Pidl.pm',
+	'EXE_FILES' => [ 'pidl' ],
+	'test' => { 'TESTS' => 'tests/*.pl' }
+);
+
+sub MY::postamble {
+<<'EOT';
+lib/Parse/Pidl/IDL.pm: idl.yp
+	yapp -m 'Parse::Pidl::IDL' -o lib/Parse/Pidl/IDL.pm idl.yp
+
+lib/Parse/Pidl/Expr.pm: expr.yp
+	yapp -m 'Parse::Pidl::Expr' -o lib/Parse/Pidl/Expr.pm expr.yp
+EOT
+}
diff --git a/pidl/README b/pidl/README
new file mode 100644
index 0000000..d678387
--- /dev/null
+++ b/pidl/README
@@ -0,0 +1,64 @@
+Introduction:
+=============
+This directory contains the source code of the pidl (Perl IDL) 
+compiler for Samba 4. 
+
+The main sources for pidl are available by Subversion on
+svn://svnanon.samba.org/samba/branches/SAMBA_4_0/source/pidl
+
+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:
+
+Standalone installation:
+========================
+Run Makefile.PL to generate the Makefile. 
+
+Then run "make install" (as root) to install.
+
+Internals overview:
+===================
+
+-- Generic --
+Parse::Pidl::Dump - Converts the parse tree back to an IDL file
+Parse::Pidl::Samba4::Header - Generates header file with data structures defined in IDL file
+Parse::Pidl::NDR - Generates intermediate datastructures for use by NDR parses/generators
+Parse::Pidl::ODL - Generates IDL structures from ODL structures for use in the NDR parser generator
+Parse::Pidl::Test - Utility functions for use in pidl's testsuite
+
+-- Samba NDR --
+Parse::Pidl::Samba4::NDR::Client - Generates client call functions in C using the NDR parser
+Parse::Pidl::Samba4::SWIG - Generates SWIG interface files (.i)
+Parse::Pidl::Samba4::NDR::Parser - Generates pull/push functions for parsing NDR
+Parse::Pidl::Samba4::NDR::Server - Generates server side implementation in C
+Parse::Pidl::Samba4::TDR - Parser generator for the "Trivial Data Representation"
+Parse::Pidl::Samba4::Template - Generates stubs in C for server implementation
+Parse::Pidl::Samba4::EJS - Generates bindings for Embedded JavaScript (EJS)
+Parse::Pidl::Samba4::Python - Generates bindings for Python
+
+-- Samba COM / DCOM --
+Parse::Pidl::Samba4::COM::Proxy - Generates proxy object for DCOM (client-side)
+Parse::Pidl::Samba4::COM::Stub - Generates stub call handler for DCOM (server-side)
+Parse::Pidl::Samba4::COM::Header - Generates headers for COM
+
+-- Wireshark --
+Parse::Pidl::Wireshark::NDR - Generates a parser for the Wireshark network sniffer
+Parse::Pidl::Wireshark::Conformance - Reads conformance files containing additional data for generating Wireshark parsers
+
+-- Utility modules --
+Parse::Pidl::Util - Misc utility functions used by *.pm and pidl.pl
+Parse::Pidl::Typelist - Utility functions for keeping track of known types and their representation in C
+
+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 
diff --git a/pidl/TODO b/pidl/TODO
new file mode 100644
index 0000000..8886441
--- /dev/null
+++ b/pidl/TODO
@@ -0,0 +1,47 @@
+- warn when union instances don't have a discriminant
+
+- EJS output backend shouldn't use the NDR levels stuff but instead 
+  as the "C levels" and NDR levels don't necessarily match.
+
+- true multiple dimension array / strings in arrays support
+
+- compatibility mode for generating MIDL-readable data:
+ - strip out pidl-specific properties
+
+- make bitmap an optional attribute on enum
+- support nested elements
+- support typedefs properly (e.g. allow "typedef void **bla;")
+- make typedefs generate real typedefs
+- improve represent_as(): allow it to be used for arrays and other complex 
+  types
+
+- --explain-ndr option that dumps out parse tree ?
+
+- seperate tables for NDR and DCE/RPC
+ - maybe no tables for NDR at all? we only need them for ndrdump 
+   and that can use dlsym()
+
+- allow data structures outside of interfaces
+
+- mem_ctx in the interface rather than as struct ndr member.
+
+- real typelibs
+
+- fix [in,out] handling and allocation for samba3:
+ - add inout
+ - make NULL to mean "allocate me"
+ - remove NDR_AUTO_REF_ALLOC flag
+
+- automatic test generator based on IDL pointer types
+
+- support converting structs to tuples in Python rather than objects
+- convert structs with a single mattering member to that member directly, e.g.:
+  struct bar {
+    int size;
+	[size_is(size)] uint32 *array;
+  };
+
+  should be converted to an array of uint32's
+
+- python: fill in size members automatically in some places if the struct isn't being returned
+  (so we don't have to cope with the array growing)
diff --git a/pidl/config.m4 b/pidl/config.m4
new file mode 100644
index 0000000..8b8bc5a
--- /dev/null
+++ b/pidl/config.m4
@@ -0,0 +1,9 @@
+# Check whether ExtUtils::ExtMaker is available
+
+if perl -e "use ExtUtils::MakeMaker" 2>/dev/null; then
+	HAVE_PERL_EXTUTILS_MAKEMAKER=1
+else
+	HAVE_PERL_EXTUTILS_MAKEMAKER=0
+fi
+
+AC_SUBST(HAVE_PERL_EXTUTILS_MAKEMAKER)
diff --git a/pidl/config.mk b/pidl/config.mk
new file mode 100644
index 0000000..07c8647
--- /dev/null
+++ b/pidl/config.mk
@@ -0,0 +1,31 @@
+PIDL = $(PERL) $(pidldir)/pidl
+
+$(pidldir)/Makefile: $(pidldir)/Makefile.PL
+	cd $(pidldir) && $(PERL) Makefile.PL PREFIX=$(prefix)
+
+pidl-testcov: $(pidldir)/Makefile
+	cd $(pidldir) && cover -test
+
+installpidl:: $(pidldir)/Makefile
+	$(MAKE) -C $(pidldir) install_vendor VENDORPREFIX=$(prefix) \
+		                           INSTALLVENDORLIB=$(datarootdir)/perl5 \
+								   INSTALLVENDORBIN=$(bindir) \
+								   INSTALLVENDORSCRIPT=$(bindir) \
+								   INSTALLVENDORMAN1DIR=$(mandir)/man1 \
+								   INSTALLVENDORMAN3DIR=$(mandir)/man3
+
+ifeq ($(HAVE_PERL_EXTUTILS_MAKEMAKER),1)
+install:: installpidl
+endif
+
+$(pidldir)/lib/Parse/Pidl/IDL.pm: $(pidldir)/idl.yp
+	-$(YAPP) -m 'Parse::Pidl::IDL' -o $(pidldir)/lib/Parse/Pidl/IDL.pm $(pidldir)/idl.yp ||\
+		touch $(pidldir)/lib/Parse/Pidl/IDL.pm 
+
+$(pidldir)/lib/Parse/Pidl/Expr.pm: $(pidldir)/idl.yp
+	-$(YAPP) -m 'Parse::Pidl::Expr' -o $(pidldir)/lib/Parse/Pidl/Expr.pm $(pidldir)/expr.yp ||\
+		touch $(pidldir)/lib/Parse/Pidl/Expr.pm 
+
+testcov-html:: pidl-testcov
+
+
diff --git a/pidl/expr.yp b/pidl/expr.yp
new file mode 100644
index 0000000..a807487
--- /dev/null
+++ b/pidl/expr.yp
@@ -0,0 +1,150 @@
+# expr.yp
+# Copyright (C) 2006 Jelmer Vernooij <jelmer at samba.org>
+# Published under the GNU GPL
+# 
+%left   '->'
+%right  '!' '~' 
+%left   '*' '/' '%'
+%left   '+' '-'
+%left	'<<' '>>'
+%left   '>' '<'
+%left   '==' '!=' 
+%left   '&'
+%left   '|'
+%left   '&&'
+%left   '||'
+%left	'?' ':'
+%left   NEG DEREF ADDROF INV
+%left 	'.'
+
+%%
+exp:        NUM
+		|	TEXT				{ "\"$_[1]\"" }
+		|	func
+		|   var
+        |   '~' exp %prec INV   { "~$_[2]" }
+        |   exp '+' exp         { "$_[1] + $_[3]" }
+        |   exp '-' exp         { "$_[1] - $_[3]" }
+        |   exp '*' exp         { "$_[1] * $_[3]" }
+        |   exp '%' exp         { "$_[1] % $_[3]" }
+        |   exp '<' exp         { "$_[1] < $_[3]" }
+        |   exp '>' exp         { "$_[1] > $_[3]" }
+        |   exp '|' exp         { "$_[1] | $_[3]" }
+        |   exp '==' exp         { "$_[1] == $_[3]" }
+        |   exp '<=' exp         { "$_[1] <= $_[3]" }
+        |   exp '=>' exp         { "$_[1] => $_[3]" }
+        |   exp '<<' exp         { "$_[1] << $_[3]" }
+        |   exp '>>' exp         { "$_[1] >> $_[3]" }
+        |   exp '!=' exp         { "$_[1] != $_[3]" }
+        |   exp '||' exp        { "$_[1] || $_[3]" }
+        |   exp '&&' exp        { "$_[1] && $_[3]" }
+        |   exp '&' exp         { "$_[1] & $_[3]" }
+		|	exp '?' exp ':' exp { "$_[1]?$_[3]:$_[5]" }
+		|	'~' exp				{ "~$_[1]" }
+		|	'!' exp				{ "not $_[1]" }
+        |   exp '/' exp         { "$_[1] / $_[3]" }
+        |   '-' exp %prec NEG   { "-$_[2]" }
+        |   '&' exp %prec ADDROF { "&$_[2]" }
+        |   exp '^' exp         { "$_[1]^$_[3]" }
+        |   '(' exp ')'         { "($_[2])" }
+;
+
+possible_pointer: 
+            VAR                 { $_[0]->_Lookup($_[1]) }
+        |   '*' possible_pointer %prec DEREF { $_[0]->_Dereference($_[2]); "*$_[2]" }
+		;
+
+var: 	possible_pointer        { $_[0]->_Use($_[1]) }
+		|	var '.'	VAR			{ $_[0]->_Use("$_[1].$_[3]") }
+		|   '(' var ')'         { "($_[2])" }
+		|	var '->' VAR 		{ $_[0]->_Use("*$_[1]"); $_[1]."->".$_[3] }
+;
+
+
+func: VAR '(' opt_args ')' { "$_[1]($_[3])" };
+opt_args: { "" } | args;
+exp_or_possible_pointer: exp | possible_pointer;
+args: exp_or_possible_pointer 
+    | exp_or_possible_pointer ',' args { "$_[1], $_[3]" }
+;
+
+%%
+
+package Parse::Pidl::Expr;
+
+sub _Lexer {
+    my($parser)=shift;
+
+    $parser->YYData->{INPUT}=~s/^[ \t]//;
+
+    for ($parser->YYData->{INPUT}) {
+        if (s/^(0x[0-9A-Fa-f]+)//) {
+			$parser->YYData->{LAST_TOKEN} = $1;
+            return('NUM',$1);
+		}
+        if (s/^([0-9]+(?:\.[0-9]+)?)//) {
+			$parser->YYData->{LAST_TOKEN} = $1;
+            return('NUM',$1);
+		}
+        if (s/^([A-Za-z_][A-Za-z0-9_]*)//) {
+			$parser->YYData->{LAST_TOKEN} = $1;
+        	return('VAR',$1);
+		}
+		if (s/^\"(.*?)\"//) {
+			$parser->YYData->{LAST_TOKEN} = $1;
+			return('TEXT',$1); 
+		}
+		if (s/^(==|!=|<=|>=|->|\|\||<<|>>|&&)//s) {
+			$parser->YYData->{LAST_TOKEN} = $1;
+            return($1,$1);
+		}
+        if (s/^(.)//s) {
+			$parser->YYData->{LAST_TOKEN} = $1;
+            return($1,$1);
+		}
+    }
+}
+
+sub _Use($$)
+{
+	my ($self, $x) = @_;
+	if (defined($self->YYData->{USE})) {
+		return $self->YYData->{USE}->($x);
+	}
+	return $x;
+}
+
+sub _Lookup($$) 
+{
+	my ($self, $x) = @_;
+	return $self->YYData->{LOOKUP}->($x);
+}
+
+sub _Dereference($$)
+{
+	my ($self, $x) = @_;
+	if (defined($self->YYData->{DEREFERENCE})) {
+		$self->YYData->{DEREFERENCE}->($x);
+	}
+}
+
+sub _Error($)
+{
+	my ($self) = @_;
+	if (defined($self->YYData->{LAST_TOKEN})) {
+		$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."' near `". $self->YYData->{LAST_TOKEN} . "'");
+	} else {
+		$self->YYData->{ERROR}->("Parse error in `".$self->YYData->{FULL_INPUT}."'");
+	}
+}
+
+sub Run {
+    my($self, $data, $error, $lookup, $deref, $use) = @_;
+    $self->YYData->{FULL_INPUT} = $data;
+    $self->YYData->{INPUT} = $data;
+    $self->YYData->{LOOKUP} = $lookup;
+    $self->YYData->{DEREFERENCE} = $deref;
+    $self->YYData->{ERROR} = $error;
+    $self->YYData->{USE} = $use;
+    return $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error);
+}
diff --git a/pidl/idl.yp b/pidl/idl.yp
new file mode 100644
index 0000000..d557590
--- /dev/null
+++ b/pidl/idl.yp
@@ -0,0 +1,497 @@
+########################
+# IDL Parse::Yapp parser
+# Copyright (C) Andrew Tridgell <tridge at samba.org>
+# released under the GNU GPL version 3 or later
+
+
+
+# the precedence actually doesn't matter at all for this grammar, but
+# by providing a precedence we reduce the number of conflicts
+# enormously
+%left   '-' '+' '&' '|' '*' '>' '.' '/' '(' ')' '[' ',' ';'
+
+
+################
+# grammar
+%%
+idl: 
+	#empty  { {} }
+	| idl interface { push(@{$_[1]}, $_[2]); $_[1] }
+	| idl coclass { push(@{$_[1]}, $_[2]); $_[1] }
+	| idl import { push(@{$_[1]}, $_[2]); $_[1] }
+	| idl include { push(@{$_[1]}, $_[2]); $_[1] }
+	| idl importlib { push(@{$_[1]}, $_[2]); $_[1] }
+	| idl cpp_quote { push(@{$_[1]}, $_[2]); $_[1] }
+;
+
+import: 'import' commalist ';' {{
+			"TYPE" => "IMPORT", 
+			"PATHS" => $_[2],
+		   "FILE" => $_[0]->YYData->{FILE},
+		   "LINE" => $_[0]->YYData->{LINE}
+		}}
+;
+include: 'include' commalist ';' {{ 
+			"TYPE" => "INCLUDE", 
+			"PATHS" => $_[2],
+		   "FILE" => $_[0]->YYData->{FILE},
+		   "LINE" => $_[0]->YYData->{LINE}
+		}}
+;
+importlib: 'importlib' commalist ';' {{ 
+			"TYPE" => "IMPORTLIB", 
+			"PATHS" => $_[2],
+		   "FILE" => $_[0]->YYData->{FILE},
+		   "LINE" => $_[0]->YYData->{LINE}
+		}}
+;
+
+commalist: 
+      text { [ $_[1] ] }
+    | commalist ',' text { push(@{$_[1]}, $_[3]); $_[1] }
+;
+
+coclass: property_list 'coclass' identifier '{' interface_names '}' optional_semicolon
+          {{
+               "TYPE" => "COCLASS", 
+	       "PROPERTIES" => $_[1],
+	       "NAME" => $_[3],
+	       "DATA" => $_[5],
+		   "FILE" => $_[0]->YYData->{FILE},
+		   "LINE" => $_[0]->YYData->{LINE},
+          }}
+;
+
+interface_names:
+	#empty { {} }
+	| interface_names 'interface' identifier ';' { push(@{$_[1]}, $_[2]); $_[1] }


-- 
Samba Shared Repository


More information about the samba-cvs mailing list